相关疑难解决方法(0)

Activity OnDestroy从未调用过?

我在ListActivity中使用以下代码

// a separate class in project
public class MyActivity extends ListActivity {
    // some common functions here..
}

public class SelectLocation extends MyListActivity {

    public void onCreate(Bundle savedInstance) {
        // here.....
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        if (adap != null) adap = null;
        if (list != null) list = null;
        System.gc();
    }
}
Run Code Online (Sandbox Code Playgroud)

任何人都指导我为什么onDestroy在我的代码中没有调用方法?

android ondestroy

27
推荐指数
3
解决办法
7万
查看次数

标签 统计

android ×1

ondestroy ×1