毕加索清除记忆 [英] Picasso clear memory

查看:153
本文介绍了毕加索清除记忆的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在片段中的视图导板中使用Picasso加载了许多图像.我想知道当我更改为其他片段时图像是否仍在内存中.如果它们保留在内存中,该如何删除它们.

I have many images loaded using Picasso in a view flipper which is in a fragment. I want to know if the images are still in memory when I change to a different fragment. If they persist in the memory how can I remove them.

任何其他将图像加载到视图脚蹼的方法的建议,将不胜感激.图像位于设备的内部存储器中.

Any suggestions on any other method to load images to a view flipper would be appreciated. The images are in the internal memory of the device.

谢谢.

推荐答案

尝试.. setIndicatorsEnabled(true).它指的是您从中加载图像的位置. 另外,请查看链接中有关调试指示器的官方文档. 在此处输入链接描述

Try.. setIndicatorsEnabled(true). It refers to where your loaded image from. Also, check the official document about DEBUG INDICATORS within the link. enter link description here

为避免Picasso从缓存加载图像.

To avoid Picasso loading image from cache.

请设置

.memoryPolicy(MemoryPolicy.NO_CACHE,MemoryPolicy.NO_STORE) .networkPolicy(NetworkPolicy.NO_CACHE,NetworkPolicy.NO_STORE)

满足您的需求.

这篇关于毕加索清除记忆的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆