• 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: PDFOutline memory management
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PDFOutline memory management


  • Subject: Re: PDFOutline memory management
  • From: John Calhoun <email@hidden>
  • Date: Tue, 17 Apr 2007 19:14:44 -0700


On Apr 17, 2007, at 6:16 PM, Adam R. Maxwell wrote:
I tried that, but unfortunately it only works for the top-level outline objects. Their children are still created using the base class.

Yeah, and to make this easier in the future, I made a change in Leopard so that when children are allocated by a PDFOutline it calls [[self class] alloc] instead of [PDFOutline alloc]. Thanks for finding these issues.


In the end, I think just adding each ephemeral child object to an array before returning it from the outline datasource method is the safest option, then just releasing that when the datasource deallocs. It wastes a bunch of memory, but at least it can be reclaimed when closing the window.

It shouldn't waste anything really. The buggy "retain" in the Tiger sample code is no better than what you're doing with the array and as I mentioned Leopard simply does the array thing for you automatically so no savings there. PDFOutline objects are not really very big objects....


Good luck.

john calhoun—_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: 
 >PDFOutline memory management (From: "Adam R. Maxwell" <email@hidden>)
 >Re: PDFOutline memory management (From: John Calhoun <email@hidden>)
 >Re: PDFOutline memory management (From: "Adam R. Maxwell" <email@hidden>)

  • Prev by Date: Any NSURLRequest with NSInputStream samples?
  • Next by Date: Re: silly question about build/release
  • Previous by thread: Re: PDFOutline memory management
  • Next by thread: reasonably easy project ideas?
  • Index(es):
    • Date
    • Thread