On Oct 16, 2013, at 1:38 PM, Charles Srstka <cocoa...@charlessoft.com> wrote: > On Oct 16, 2013, at 11:57 AM, Steve Mills <smi...@makemusic.com> wrote: > >> So at this point, let's finish this thread by going back to my original >> question. Is it OK to use the private instance variable _itemArray in NSMenu >> since the methods we've added are *extensions* of NSMenu and not a subclass? > > I wouldn't. If, in some OS update, Apple changes the NSMenu class such that > the _itemArray ivar is no longer being used, your app would blow up horribly. > Also, if Apple starts doing something like lazily populating that array or > otherwise updating it at the time you ask for it, that won't get done if you > access the ivar directly.
Great points. I withdraw my "probably safe" comment. Why take a chance? As for the creeping memory footprint, maybe try Heapshot Analysis to see what objects are being created during particular intervals? --Andy _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com