• 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
NSImageView Subclass Leak?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSImageView Subclass Leak?


  • Subject: NSImageView Subclass Leak?
  • From: Chris Outwin <email@hidden>
  • Date: Sun, 22 Jan 2006 19:05:36 -0600

I have created a non-document, Cocoa test app which seems to suggest there may be a memory leak when subclassing NSImageView.

The sub-classed view is seen in a NSPanel contained in a separate nib. An AppController in MainMenu.nib creates a NSWindowController subclass for the second nib. This NSWindowController subclass is the file owner for the second nib.

The 12 byte leak occurs when [super drawRect:rect]; is added to - (void)drawRect:(NSRect)rect of the NSImageView subclass. When [super drawRect:rect] is commented-out, the leak disappears.

The view is not drawn if [super drawRect:rect]; is not called. Have I made a mistake? If not, is there a solution?
_______________________________________________
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: Incompatible pointer type from NSManagedObject's validateValue:forKey:error method
  • Next by Date: Re: PCH not being used
  • Previous by thread: NSTextView - custom pasteboard types and tables
  • Next by thread: RE: PCH not being used - SOLVED!
  • Index(es):
    • Date
    • Thread