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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to