True object size
True object size
- Subject: True object size
- From: "R. Tyler Ballance" <email@hidden>
- Date: Thu, 15 Mar 2007 22:06:19 -0500
I'm trying to find out the actual size of a custom (or Foundation)
object in terms of the bytes, in effect, allowing something like the
following:
@interface SomeObject : NSObject {
NSString *someString;
NSData *someData;
NSNumber *someNumber;
}
@end
To where if I did a [Sizer sizeOf:someObject]; it would return to me
the number of bytes that the someObject would represent if you were
to write it out to disk or the network (verbatim).
Obviously, sizeof() is out, but I'm wondering if there's any
"straightforward" means of finding out the size on the stack that any
given instantiated object is taking up, any runtime methods I can
call, etc?
Cheers
R. Tyler Ballance: Lead Mac Developer at bleep. software
contact: email@hidden | jabber: email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden