From: Andres Noetzli Date: Thu, 13 Feb 2020 00:16:21 +0000 (-0800) Subject: [Python] Properly destroy CVC4 object (#3753) X-Git-Tag: cvc5-1.0.0~3651 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bfa008a7ce13eff2f59b022e8c2d5d71d77f9ecb;p=cvc5.git [Python] Properly destroy CVC4 object (#3753) --- 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 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 */