Merge "Detect and throw exception for using objects after explicitly destroying them."
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