それは大丈夫のようなすべてのimage.For例えば何かロードするためのピカソの新しいinstaceを作成することです:それは作成されませlistAdaptor
.DoesのgetView()
にはピカソ毎回の新しいインスタンスを作成し、それは大丈夫です
Picasso.with(context)
.load(url)
.placeholder(R.drawable.placeholder)
.error(R.drawable.error)
.centerInside(
.tag(context)
.into(holder.image);
を新しいLruCache
が毎回OOMにつながります。また
Context
は
Activity Context
することができピカソに渡すことができます。
/** Start building a new {@link Picasso} instance. */
public Builder(Context context) {
if (context == null) {
throw new IllegalArgumentException("Context must not be null.");
}
this.context = context.getApplicationContext();
}
「現在のプロセスのグローバルな単一のアプリケーションオブジェクト」を強調したいと思います。これは、あなたのアプリケーションが実行されているプロセスごとに1つのPicassoのインスタンスを持つ必要があることを意味します。 – Sebastiano