re PR libgcj/12475 (Stack traces leak memory)
Fix PR libgcj/12475 * gnu/gcj/runtime/StackTrace.java (finalize): Declare. * gnu/gcj/runtime/natStackTrace.cc (finalize): New. Free "addrs". From-SVN: r72012
This commit is contained in:
committed by
Bryce McKinlay
parent
f4b2bde73f
commit
fddb33d2cd
@@ -157,6 +157,7 @@ public final class StackTrace
|
||||
}
|
||||
|
||||
private native void fillInStackTrace(int n, int offset);
|
||||
protected native void finalize();
|
||||
|
||||
private static native MethodRef getCompiledMethodRef(RawData addr);
|
||||
private static IdentityHashMap map = new IdentityHashMap();
|
||||
|
||||
@@ -200,4 +200,9 @@ gnu::gcj::runtime::StackTrace::update(void)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
gnu::gcj::runtime::StackTrace::finalize(void)
|
||||
{
|
||||
if (addrs != NULL)
|
||||
_Jv_Free (addrs);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user