Re: Relieving memory pressure
Re: Relieving memory pressure
- Subject: Re: Relieving memory pressure
- From: Gabriel Zachmann via Cocoa-dev <email@hidden>
- Date: Sun, 7 Jun 2020 23:33:22 +0200
Thanks a lot for your response.
> If that’s the case, why can’t you just load the next image from disk on a
> background queue while
That is what I'm doing, since loading the next image could take up to 9 seconds.
> the current image is being displayed and not have to worry about memory usage
> needed to cache multiple images? (I am assuming that you’ll need to load each
> image once anyway.)
Unless the user wants to see one of the previous images (i'm storing up to 12).
In that case, the app should be able to go back to the previous image
instantaneously.
>
> The NSCache class incorporates various auto-eviction policies, which ensure
> that a cache doesn’t use too much of the system’s memory. If memory is needed
> by other applications, these policies remove some items from the cache,
> minimizing its memory footprint.
Sounds interesting! I'll check that out.
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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