summaryrefslogtreecommitdiff
path: root/src/cvc4.i
diff options
context:
space:
mode:
authorAndres Noetzli <andres.noetzli@gmail.com>2020-02-12 16:16:21 -0800
committerGitHub <noreply@github.com>2020-02-12 18:16:21 -0600
commitbfa008a7ce13eff2f59b022e8c2d5d71d77f9ecb (patch)
tree7d84edc098c7c6a25f8bd2cfff2a02495a1c9bae /src/cvc4.i
parent3ba75ef701deb17a3871ca3b04d9596afac1c527 (diff)
[Python] Properly destroy CVC4 object (#3753)
Diffstat (limited to 'src/cvc4.i')
-rw-r--r--src/cvc4.i7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/cvc4.i b/src/cvc4.i
index 9e69212ae..bed988b32 100644
--- a/src/cvc4.i
+++ b/src/cvc4.i
@@ -69,10 +69,9 @@ std::set<JavaInputStreamAdapter*> CVC4::JavaInputStreamAdapter::s_adapters;
#ifdef SWIGPYTHON
%pythonappend CVC4::SmtEngine::SmtEngine %{
- self.thisown = 0
-%}
-%pythonappend CVC4::ExprManager::ExprManager %{
- self.thisown = 0
+ # Hold a reference to the ExprManager to make sure that Python keeps the
+ # ExprManager alive as long as the SmtEngine exists
+ self.em = em
%}
#endif /* SWIGPYTHON */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback