• 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
iPhone resource cache - memory question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

iPhone resource cache - memory question


  • Subject: iPhone resource cache - memory question
  • From: Philip Mobley <email@hidden>
  • Date: Wed, 5 May 2010 16:27:29 -0700

I am designing a slightly smarter resource cache that purges less frequently used resources instead of a purge all when getting an UIApplication delegate "applicationDidReceiveMemoryWarning:" message.  I know the target (currently) is 20 MBs (although that could change with future hardware).  The problem I am running into is finding out if I have purged enough.

Is there a method to get the current app memory allocation for the iPhone?  Also is there a  constant that I can compare it to (memory value to issue warning)?

This would allow me to do a loop something like:

while (appCurrentMemory > issueMemoryWarningAtValue) {
  [self purgeOldestAccessedObject];
}


_______________________________________________

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

  • Follow-Ups:
    • Re: iPhone resource cache - memory question
      • From: David Duncan <email@hidden>
  • Prev by Date: Re: Using a keyboard to push a button
  • Next by Date: Re: Authenticate NSFileManager Operations
  • Previous by thread: Re: Are there any tools or techniques for detecting / debugging retain-cycles?
  • Next by thread: Re: iPhone resource cache - memory question
  • Index(es):
    • Date
    • Thread