Merge "Fixed ScriptGroup finalizer for old API" into nyc-dev
am: ecf094a
* commit 'ecf094ae9d715ac3cff6213fae4c904f9dd791e8':
Fixed ScriptGroup finalizer for old API
Change-Id: Icd420a0023b7c614d7dd2104a38acfb62f66d450
This commit is contained in:
@@ -1074,7 +1074,11 @@ public final class ScriptGroup extends BaseObj {
|
||||
protected void finalize() throws Throwable {
|
||||
// Clear out the list mClosures to avoid double-destroying the closures,
|
||||
// in case their finalizers race ahead.
|
||||
mClosures.clear();
|
||||
if (mClosures != null) {
|
||||
// ScriptGroup created using the old Builder class does not
|
||||
// initialize the field mClosures
|
||||
mClosures.clear();
|
||||
}
|
||||
super.finalize();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user