Re: NSTextView won't deallocate
Re: NSTextView won't deallocate
- Subject: Re: NSTextView won't deallocate
- From: Jens Alfke <email@hidden>
- Date: Sun, 17 Jul 2011 21:59:00 -0700
On Jul 17, 2011, at 1:41 PM, Ryan Joseph wrote:
> view := NSTextView.alloc.initWithFrame(NSMakeRect(0, 0, 0, 0));
> // retainCount = 5
> view.release;
> // retainCount = 4, dealloc never called
Impossible to tell from that snippet. Keep in mind that a view’s superview retains it, so a view in a window will never be dealloced until you remove it from its superview or close/release the window. Another possibility is that the view is retained by some other object that’s being leaked … sometimes you have to look at all the leaks to find the one that triggers all the others. (Use Instruments or the ‘leaks’ command to look for all leaked objects.)
—Jens
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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