• 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 12:02:54 +0100

On 12 janv. 04, at 11:45, Scott Anguish wrote:


On Jan 12, 2004, at 4:15 AM, Jirome Foucher wrote:

But each time I open such a NIB file and close the window, the application's memory keeps increasing. I'm sure I release every object that I've allocated, so this must be something allocated by Cocoa when loading the NUIB file that is not automatically released.


Yes... it is.

Top level Nib items are your responsibility to release.

http://developer.apple.com/documentation/Cocoa/Conceptual/ LoadingResources/Concepts/NibFileLoaded.html

I've read that document already.

The only top level item is my NSWindow.
I''ve checked that by setting the external name table to :
[NSDictionary dictionaryWithObjectsAndKeys:[self, @"NSOwner", aMutableDictForTopLevelsItems, @"NSTopLevelObjects", nil]

And I'm sure the window is released (i've NSLogged it)

The call to [NSBundle loadNibFile...] is done inside the delegate of my application. So this is just a NSObject.

Inside the NIB file, of which type should the "File's owner" be ? NSObject, NSWindowController ?
Does it have any importance ?

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: 
 >How to completely release every object allocated when opening a NIB file ? (From: Jérome Foucher <email@hidden>)
 >Re: How to completely release every object allocated when opening a NIB file ? (From: Scott Anguish <email@hidden>)

  • Prev by Date: Re: Need more NSLeftMouseDragged events
  • Next by Date: Re: calling cocoa method inside carbon function...
  • 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