Re: Memory issue with ALAssetLibrary
Re: Memory issue with ALAssetLibrary
- Subject: Re: Memory issue with ALAssetLibrary
- From: Jens Alfke <email@hidden>
- Date: Fri, 31 Jan 2014 07:04:46 -0800
On Jan 30, 2014, at 10:04 PM, Peng Gu <email@hidden> wrote:
> When I use *ALAssetLibrary:assetForURL:resultBlock:failtureBlock *to
> retrieve full screen images from camera roll, the allocated memory never
> release until the app enters the background. My guess is the system keeps
> the cache for the images somewhere.
Sounds like it might be using an NSCache — memory held by those is released at the OS's discretion. Definitely if free space gets low, but I've also seen them get emptied when the app deactivates.
If so, this shouldn't be anything to worry about. The cache speeds up repeated access to the asset, but shouldn't cause memory problems for your app since it'll be discarded to make room if necessary.
—Jens
_______________________________________________
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