• 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: How to completely release every object allocated when opening a NIB file ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to completely release every object allocated when opening a NIB file ?


  • Subject: Re: How to completely release every object allocated when opening a NIB file ?
  • From: Jérome Foucher <email@hidden>
  • Date: Mon, 12 Jan 2004 14:12:52 +0100

On 12 janv. 04, at 13:41, Jvrn Salewski wrote:

am 12.01.2004 10:15 Uhr schrieb Jirome Foucher unter
email@hidden:

Hi all,

I'm having big problems stopping my application from leaking.

- Here's the short story :
My app loads differents NIB files using
[NSBundle loadNibFile:path externalNameTable:NULL
withZone:NSDefaultMallocZone()];

The NIB file only holds a NSWindow which is set to release when closed.
The owner is a NSWindowController.
When the window closes, it's correctly released (I've traced it).


Jirome,

I've written a sort of custom WindowController, rather a NibController, that
might help.

To avoid memory leaks, all objects stored in the "topLevelNibObjects"
dictionary recieve an "extra" release message during deallocation (the owner
of the nib (=self) is responsible to do so in addition to the container
class instance they are stored in).

Thanks. I'll try that.

Jirome
_______________________________________________
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: 
 >Re: How to completely release every object allocated when opening a NIB file ? (From: Jörn Salewski <email@hidden>)

  • Prev by Date: Re: a good book
  • Next by Date: Re: NSKeyedUnarchiver and "root" key
  • Previous by thread: Re: How to completely release every object allocated when opening a NIB file ?
  • Next by thread: Re: How to completely release every object allocated when opening a NIB file ?
  • Index(es):
    • Date
    • Thread