I was optimizing my app and wanted to know that how much is the size of the object, so that i can also show it in log.
suppose i have
NSDictionary *temp=(NSDictionary*)[Data objectAtIndex:i];
//data is defined in the .h file
The compiler knows only about the pointer, and that is why it will always return size of the pointer. To find the size of the allocated object try something like
NSLog(@"size of Object: %zd", malloc_size(myObject));