• 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
loadNibNamed:owner: Who disposes of the loaded objects?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

loadNibNamed:owner: Who disposes of the loaded objects?


  • Subject: loadNibNamed:owner: Who disposes of the loaded objects?
  • From: "M. Uli Kusterer" <email@hidden>
  • Date: Thu, 25 Sep 2003 01:35:58 +0200

Hi,

I'm using [NSBundle loadNibNamed: @"MyNibFile" owner: self]; in one of my classes' -init method. It works like a charm, but I just realized that I don't know how I'm supposed to dispose of the loaded objects.

One of my NIBs contains an NSView with sub-views, another contains an NSPanel. I have outlets in my class that are set to the loaded objects. Do I have to release them? I know I need to when I'm dealing with alloc, new or copy, but what about "load"?

And if I'm not responsible for releasing them, who is? Are they autoreleased? Then why does my code work? Apple's docs are suspiciously quiet about this. They only say the objects are loaded into my object's zone ...
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
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: loadNibNamed:owner: Who disposes of the loaded objects?
      • From: Chris Hanson <email@hidden>
    • Re: loadNibNamed:owner: Who disposes of the loaded objects?
      • From: Matthew Formica <email@hidden>
References: 
 >dataFromPropertyList:format:errorDescription: (From: Steve Mykytyn <email@hidden>)

  • Prev by Date: Re: Responding to menu items
  • Next by Date: Adding HFS file type to a file
  • Previous by thread: dataFromPropertyList:format:errorDescription:
  • Next by thread: Re: loadNibNamed:owner: Who disposes of the loaded objects?
  • Index(es):
    • Date
    • Thread