• 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
Second Window Leak
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Second Window Leak


  • Subject: Second Window Leak
  • From: Chris Outwin <email@hidden>
  • Date: Sun, 19 Mar 2006 21:02:53 -0600

I have a leak which I haven't seen covered in the archives or Google.

My Cocoa, non-document app has a second window (a NSPanel) controlled by a NSWindowController subclass. This controller is created in a class method as a static object. Its init method calls self = [self initWithWindowNibName:@"ToolPalette"]; The controller is the Nib file owner and has its window outlet connected. The panel has its delegate outlet connected to the file owner.

When I drag a NSImageView on to the panel, MallocDebug reports a 12 byte leak. If I remove the NSImageView and drag other IB objects on to the panel, some leaks; others don't. For example:

NSColorWell		No leak
NSTabView		12 byte leak
NSTextField		12 byte leak
NSTableView	No leak
NSSlider                No leak
NSMatrix		12 byte leak

The documentation in What Happens When a Nib File is Loaded says, "Note that NSWindowController automatically releases its nib file’s objects for you." I created a test app which just opens an additional panel, and tested the above IB elements one at a time. They leak as noted.



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: NSString propertyList crash
  • Next by Date: Re: White caret cursor, how to do it?
  • Previous by thread: Re: NSUserDefaults
  • Next by thread: Socket detecting disconnect?
  • Index(es):
    • Date
    • Thread