8273902: Memory leak in OopStorage due to bug in OopHandle::release()
Reviewed-by: sspitsyn, coleenp
This commit is contained in:
parent
9c5441c9c4
commit
bc48a0ac29
src/hotspot/share
@ -48,7 +48,7 @@ inline OopHandle::OopHandle(OopStorage* storage, oop obj) :
|
||||
}
|
||||
|
||||
inline void OopHandle::release(OopStorage* storage) {
|
||||
if (peek() != NULL) {
|
||||
if (_obj != NULL) {
|
||||
// Clear the OopHandle first
|
||||
NativeAccess<>::oop_store(_obj, (oop)NULL);
|
||||
storage->release(_obj);
|
||||
|
@ -206,9 +206,7 @@ JvmtiBreakpoint::JvmtiBreakpoint(Method* m_method, jlocation location)
|
||||
}
|
||||
|
||||
JvmtiBreakpoint::~JvmtiBreakpoint() {
|
||||
if (_class_holder.peek() != NULL) {
|
||||
_class_holder.release(JvmtiExport::jvmti_oop_storage());
|
||||
}
|
||||
_class_holder.release(JvmtiExport::jvmti_oop_storage());
|
||||
}
|
||||
|
||||
void JvmtiBreakpoint::copy(JvmtiBreakpoint& bp) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user