-[NSView dataWithPDFInsideRect:] leaks
-[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] initWith
Data: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.