diff options
author | Andres Noetzli <andres.noetzli@gmail.com> | 2020-06-18 12:21:02 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-18 12:21:02 -0700 |
commit | 7d16d25dc9c527848eddac8414db22fe63b38e59 (patch) | |
tree | f56c6c16ad424bd6b90c629aa25584a72e6d5acf /src/util/string.h | |
parent | c752258539ddb4c97b4fcbe7481cb1151ad182d0 (diff) |
Improve memory management in Java bindings (#4629)
Fixes #2846. One of the challenges of the Java bindings is that the
garbage collector can delete unused objects at any time in any order.
This is an issue with CVC4's API because we require all `Expr`s to be
deleted before the corresponding `ExprManager`. In the past, we were
using `NewGlobalRef`/`DeleteGlobalRef` on the wrapper object of
`ExprManager`. The problem is that we can have multiple instances of the
wrapper that internally all refer to the same `ExprManager`. This commit
implements a different approach where the Java wrappers hold an explicit
reference to the `ExprManager`. The commit also removes some unused or
unimportant API bits from the bindings.
Diffstat (limited to 'src/util/string.h')
0 files changed, 0 insertions, 0 deletions