• 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
Retaining Menus
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Retaining Menus


  • Subject: Retaining Menus
  • From: email@hidden
  • Date: Sun, 27 Jul 2003 03:07:44 -0400

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.

  • Follow-Ups:
    • Re: Retaining Menus
      • From: Michael Latta <email@hidden>
  • Prev by Date: Saving Information from NSTableView (kind of basic)
  • Next by Date: cocoa version of 'FSpRename' ?
  • Previous by thread: Saving Information from NSTableView (kind of basic)
  • Next by thread: Re: Retaining Menus
  • Index(es):
    • Date
    • Thread