Total Size of NSMutableArray object

Posted by sj wengi on Stack Overflow See other posts from Stack Overflow or by sj wengi
Published on 2009-10-04T03:51:19Z Indexed on 2011/01/09 21:53 UTC
Read the original article Hit count: 209

Hi Folks,

I've got an NSMutableArray that holds a bunch of objects, what I'm trying to figure out is how much memory is the array using. After looking at a couple of places I know about the sizeof call, and when I make it I get 32 bits (which is the size of the NSMutableArray object it self).

Example code:

NSMutableArray *temp = [[NSMutableArray alloc]init];
[temp addObject:objectxyz];
[temp addObject:objectabc];
[temp addObject:object123];

now I want to know the size :)

Thanks,

Sj

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c