DO NOT MERGE Fix finalizer ordering/double-free issue

Bug: 18289984

If Surface:finalize() happens after HwuiContext:finalize()
it would try to manipulate a destroyed object. However, as
Surface:finalize() always calls HwuiContext:destroy() this
can be fixed by simply getting rid of HwuiContext's finalizer

Change-Id: I7c912214417ab32891b1c58d045c9721e5f01965
(cherry picked from commit c298f9c917)
This commit is contained in:
John Reck
2014-11-07 10:33:36 -08:00
parent 10a08abd8f
commit 050a8a050d

View File

@@ -601,15 +601,6 @@ public class Surface implements Parcelable {
mHwuiRenderer = 0;
}
}
@Override
protected void finalize() throws Throwable {
try {
destroy();
} finally {
super.finalize();
}
}
}
private static native long nHwuiCreate(long rootNode, long surface);