Re: NSTextView won't deallocate
Re: NSTextView won't deallocate
- Subject: Re: NSTextView won't deallocate
- From: Kyle Sluder <email@hidden>
- Date: Mon, 18 Jul 2011 15:38:29 -0700
On Mon, Jul 18, 2011 at 2:30 PM, Peter <email@hidden> wrote:
> Yes - so the more appropriate question is why it was retained 4 times.
> I don't see Cocoa doing it.
> It's the programmer - mostly.
> Could you give us more code?
>
> Cocoa gives us a very reliable way to know, when an object is released: If the reference count goes down to 0.
> The question now is how to bring it down to 0.
Don't think about retain counts. Especially on NSTextView, which has a
custom retain/release implementation that prevents its retain count
from ever reaching zero the normal way, and changes depending on
whether the NSTextView was unarchived from nib or created
programmatically.
--Kyle Sluder
_______________________________________________
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