iPhone resource cache - memory question
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