Re: NSPDFImageRep Memory Leak?
Re: NSPDFImageRep Memory Leak?
- Subject: Re: NSPDFImageRep Memory Leak?
- From: John Calhoun <email@hidden>
- Date: Tue, 8 Sep 2009 11:17:52 -0700
On Sep 8, 2009, at 5:08 AM, DairyKnight wrote:
NSPDFImageRep *pdfImgRep = [[NSPDFImageRep alloc] initWithData:[page
dataRepresentation]];
Check [page dataRepresentation] above.
Pre-SnowLeopard the NSData returned was not autoreleased and so needed
to be released by the caller. This was not consistent with other
AppKit -[xxx dataRepresentation] calls.
In SnowLeopard, -[PDDPage dataRepresentation] is properly auto-
released. SnowLeopard PDF Kit though checks the compiler and
continues the non-auto-prelease behavior for apps compiled before
SnowLeopard.
The above applies to -[PDFDocument dataRepresentation] as well.
Check the PDFXxx headers, the behavior change is documented there.
John Calhoun—_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden