3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-26 02:25:32 +00:00

Bugfix for object finalization in Java API.

Relates to #205 and #245
This commit is contained in:
Christoph M. Wintersteiger 2015-10-14 12:43:09 +01:00
parent 6263252bf5
commit e312b47be6
4 changed files with 40 additions and 14 deletions

View file

@ -24,11 +24,20 @@ public class ConstructorList extends Z3Object
{
/**
* Destructor.
* @throws Throwable
* @throws Z3Exception on error
**/
protected void finalize()
protected void finalize() throws Throwable
{
Native.delConstructorList(getContext().nCtx(), getNativeObject());
try {
Native.delConstructorList(getContext().nCtx(), getNativeObject());
}
catch (Throwable t) {
throw t;
}
finally {
super.finalize();
}
}
ConstructorList(Context ctx, long obj)