Detect and throw exception for using
objects after explicitly destroying them. Change-Id: Ic50d6974c80672846140c7f9435ec9468855f0bc
This commit is contained in:
@@ -32,6 +32,9 @@ class BaseObj {
|
||||
}
|
||||
|
||||
public int getID() {
|
||||
if (mDestroyed) {
|
||||
throw new IllegalStateException("using a destroyed object.");
|
||||
}
|
||||
return mID;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user