fresco icon indicating copy to clipboard operation
fresco copied to clipboard

Question about MemoryTrimmableRegistry

Open ICECHN opened this issue 11 years ago • 2 comments

Is there any demo code for using MemoryTrimmableRegistry? Is it necessory to add ImagePipelineConfig.Builder.setMemoryTrimmableRegistry(new MemoryTrimmableRegistry() {...})?

ICECHN avatar Jun 02 '15 07:06 ICECHN

In short, yes, you'll have to provide your own implementation of MemoryTrimmableRegistry. MemoryTrimmableRegistry should maintain a list of registered trimmables and should also listen for the system events in order to detect the low-memory conditions. When low-memory conditions occur, registry should notify its trimmables in order to release some memory. We shall amend the documentation on how to do that.

plamenko avatar Jun 02 '15 11:06 plamenko

See http://frescolib.org/docs/configure-image-pipeline.html#using-a-memorytrimmableregistry

IanChilds avatar Oct 16 '15 10:10 IanChilds