在
为什么 Picasso 在每次都执行
Picasso.with(context)
中...public static Picasso with(Context context) {
if (singleton == null) {
synchronized (Picasso.class) {
if (singleton == null) {
singleton = new Builder(context).build();
}
}
}
return singleton;
}
而 Builder(Context 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();
}
为什么 Picasso 在每次都执行
setting context = context.getApplicationContext( )
的情况下还要请求上下文呢?