• 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
Re: NSPDFImageRep Memory Leak?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >NSPDFImageRep Memory Leak? (From: DairyKnight <email@hidden>)
 >Re: NSPDFImageRep Memory Leak? (From: John Calhoun <email@hidden>)

  • Prev by Date: Re: usb notification
  • Next by Date: Re: Core Data fetch with to-many relationship
  • Previous by thread: Re: NSPDFImageRep Memory Leak?
  • Next by thread: [iPhone] : How to customize Phonepad ?
  • Index(es):
    • Date
    • Thread