• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Retaining Menus
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Retaining Menus (From: email@hidden)

  • Prev by Date: Re: A4 and NSMakeRect
  • Next by Date: Re: MP3 info?
  • Previous by thread: Retaining Menus
  • Next by thread: cocoa version of 'FSpRename' ?
  • Index(es):
    • Date
    • Thread