Remove an UNIMPLEMENTED(WARNING) that isn't worth implementing.
We _could_ fix this, but it would be ugly, potentially expensive, and it's
really not obvious there's any point. (At least until we have to worry about
DexFile*s not owned by the ClassLinker.)
Change-Id: I2404bfe15e36bba0a6d1d362a465f2fccf1223eb
diff --git a/src/dex_file.cc b/src/dex_file.cc
index 7c49644..a84c316 100644
--- a/src/dex_file.cc
+++ b/src/dex_file.cc
@@ -359,9 +359,10 @@
}
DexFile::~DexFile() {
- if (dex_object_ != NULL) {
- UNIMPLEMENTED(WARNING) << "leaked a global reference to an com.android.dex.Dex instance in " << location_;
- }
+ // We don't call DeleteGlobalRef on dex_object_ because we're only called by DestroyJavaVM, and
+ // that's only called after DetachCurrentThread, which means there's no JNIEnv. We could
+ // re-attach, but cleaning up these global references is not obviously useful. It's not as if
+ // the global reference table is otherwise empty!
}
jobject DexFile::GetDexObject(JNIEnv* env) const {