Re: Retaining Menus
Re: Retaining Menus
- Subject: Re: Retaining Menus
- From: Michael Latta <email@hidden>
- Date: Sun, 27 Jul 2003 09:13:51 -0700
The retain is incorrect in general. The example code may have done it
for some weird reason.
Michael
On Sunday, July 27, 2003, at 12:07 AM, email@hidden wrote:
Hello,
In a cocoa programming book I have, it gives an example of how to make
a status item.
It creates a menu like this:
m_menu = [[[NSMenu alloc] init] retain];
I was just wondering why there is a retain?
Why does it need a retain after it has been alloc'ed already?
-Alex P.
_______________________________________________
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.
_______________________________________________
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.