Re: Memory issue with ALAssetLibrary
Re: Memory issue with ALAssetLibrary
- Subject: Re: Memory issue with ALAssetLibrary
- From: Peng Gu <email@hidden>
- Date: Fri, 31 Jan 2014 10:33:36 -0500
Thanks Jens,
In my case, it uses at most 12MB memory, new images didn't cause more
memory usage. It hasn't caused any problems for my app. Good to know
NSCache is released by the OS : ]
--
Peng
On Fri, Jan 31, 2014 at 10:04 AM, Jens Alfke <email@hidden> wrote:
>
> 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