AI智能
改变未来

android handle弱引用

public class WeakReferenceHandle extends Handler {private final WeakReference<Context> mContext;public WeakReferenceHandle(Context context) {mContext = new WeakReference<Context>(context);}@Overridepublic void handleMessage(Message msg) {if(mContext.get() == null) {return;}}}
赞(0) 打赏
未经允许不得转载:爱站程序员基地 » android handle弱引用