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: Tobias Hermann <email@hidden>
- Date: Thu, 22 May 2003 16:57:24 +0200
hi!
I made a mistake :-) setMenu: nil does AUTORELEASE the menu, so that is
fine.
but this still happens:
ps: By the way. When creating such a menu in Interface builder, every
menu Item added within IB increases the menu's retain count by one.
Why is that?
When I programmatically add menu Items, the menu does NOT get retained.
Consider a NSMenu built in IB. It has 4 menu items. After
awakeFromNib, the menu's retain count is 5. (4 uneseccary retains from
the items).
The joke is: If you call removeItemAtIndex in order to remove the
items, the menu does NOT get released...
Something is going wrong there... Or I really did understand something
totally wrong :-(
_______________________________________________
regards
Tobi
_______________________________________________
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.