Re: setMenu: nil does not release a menu ?
Re: setMenu: nil does not release a menu ?
- Subject: Re: setMenu: nil does not release a menu ?
- From: lbland <email@hidden>
- Date: Thu, 22 May 2003 11:05:06 -0400
On Thursday, May 22, 2003, at 10:34 AM, Tobias Hermann wrote:
[aView setMenu: nil]; does NOT release aMenu again.
Is this normal ? I get unwanted memory leaks that way! I want to
release my menu properly when I don't need it anymore!
download this app:
http://www.vvi.com/~lbland/testApp.gz
that shows what is going on. click test then report
when you send setMenu:nil then the view menu is released in a global
queue. that means it is released in the future, i.e.: after you tested
to see if it is released. you need to test the retainCount in the
future, not immediately after the method call.
digging into retain/release contexts is tricky...
-lance
Lance Bland
mailto:email@hidden
VVI
888-VVI-PLOT
http://www.vvi.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.