Sanity Check on Memory Leaks
Sanity Check on Memory Leaks
- Subject: Sanity Check on Memory Leaks
- From: Jerry Krinock <email@hidden>
- Date: Tue, 13 Feb 2007 07:46:10 -0800
- Thread-topic: Sanity Check on Memory Leaks
I have subclassed NSMenu to make hierarchical contextual menus attached to
cells in NSOutlineViews, and in this subclass I have placed NSLog statements
in the -init and -dealloc methods.
As a hierarchical contextual menu is displayed and traversed, in the log I
see SubclassedNSMenu objects being initted. After the mouse is released and
the menu disappears, I see that the top-level objects are deallocced, but
the deeper objects are not deallocced. Even after the parent outline,
window and document are closed and deallocced, the deeper menu objects are
still not deallocced.
My conclusion is therefore that I have memory leaks or retain cycles that
are preventing the deeper ones from being deallocced, and that I should keep
looking until I find these problems.
Am I correct?
Thanks,
Jerry Krinock
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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