Re: subclass overwriting superclass ivar
Re: subclass overwriting superclass ivar
- Subject: Re: subclass overwriting superclass ivar
- From: vincent habchi <email@hidden>
- Date: Wed, 26 May 2010 14:13:25 +0200
Le 26 mai 2010 à 13:40, email@hidden a écrit :
> A subclass ivar is apparently overwriting a super class ivar.
> When an instance of MGS_B sets stderrData the super class ivar tempFilePath gets overwritten.
If I am not mistaken, if your superclass ivar is private (!= protected), it cannot be accessed from its subclasses. Thus, the compiler can choose to reuse part of the heap dedicated to private variables to implement subclasses own private ivars.
Vincent_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden