On May 26, 2010, at 6:00 AM, Roland King <[email protected]> wrote:
@interface A(MyCategory)
-(void)someMethodWhichLegallyAccessesThePrivateVariablePriv;
@end
That's legal, I can write a category against an already-compiled
class without having the source and without recompiling it and I can
access any of the private variables of that class. So no the
compiler cannot throw away instance variables when it compiles the
class originally even if no method of A used them originally because
someone might go write a category against the compiled object which
needs it later.
Actually, this will not work across a module boundary on the modern
runtime because the linker will strip the symbol for the private ivar.
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list ([email protected])
Please 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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [email protected]