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:
parent
f4b2bde73f
commit
fddb33d2cd
3 changed files with 13 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
2003-10-01 Bryce McKinlay <bryce@mckinlay.net.nz>
|
||||
|
||||
Fix PR libgcj/12475
|
||||
* gnu/gcj/runtime/StackTrace.java (finalize): Declare.
|
||||
* gnu/gcj/runtime/natStackTrace.cc (finalize): New. Free "addrs".
|
||||
|
||||
2003-10-01 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* gnu/gcj/runtime/FirstThread.java (getMain): Fixed indentation.
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue