Re: NSPDFImageRep Memory Leak?
Re: NSPDFImageRep Memory Leak?
- Subject: Re: NSPDFImageRep Memory Leak?
- From: DairyKnight <email@hidden>
- Date: Wed, 9 Sep 2009 10:03:08 +0800
Thanks. That's the problem. By releasing the NSData PDFPage returns, the
program now consumes half the memory.
But still, the memory it consumes keeps increasing.... and yet I cannot
figure out why...
On Wed, Sep 9, 2009 at 2:17 AM, John Calhoun <email@hidden> wrote:
> 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