• 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
-[NSView dataWithPDFInsideRect:] leaks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

-[NSView dataWithPDFInsideRect:] leaks


  • Subject: -[NSView dataWithPDFInsideRect:] leaks
  • From: Peter Sichel <email@hidden>
  • Date: Thu, 18 Apr 2002 14:11:50 -0400

My application includes a window that plots network throughput
within a subclass of NSView. I'd like to make the plot within
this NSView appear as the miniaturized Dock image when the window
is miniaturized.

The code below works, but leaks from -dataWithPDFInsideRect

if ([[self window] isMiniaturized]) {
NSImage* anImage;
NSData* pdfData;
// get the desired image
pdfData = [plotView dataWithPDFInsideRect:[plotView bounds]];
anImage = [[NSImage alloc] initWithData:pdfData];
[[self window] setMiniwindowImage:anImage];
[anImage release];
}

Can anyone suggest a better way to convert an NSView (in a miniaturized
window) to an NSImage that doesn't leak so much?

Thanks!

- Peter
--
_______________________________________________
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: -[NSView dataWithPDFInsideRect:] leaks
      • From: Ondra Cada <email@hidden>
    • Re: -[NSView dataWithPDFInsideRect:] leaks
      • From: "Erik M. Buck" <email@hidden>
References: 
 >Re: Porting a Win app to MAC 10 (From: Kaelin Colclasure <email@hidden>)

  • Prev by Date: Problem with dynamically generated menu
  • Next by Date: [ANN] New AppleScript Studio article
  • Previous by thread: Re: Porting a Win app to MAC 10
  • Next by thread: Re: -[NSView dataWithPDFInsideRect:] leaks
  • Index(es):
    • Date
    • Thread