tweag / pirouette

Language-generic workbench for building static analysis
MIT License
47 stars 2 forks source link

fix memory leak of Z3 context #157

Closed qaristote closed 2 years ago

qaristote commented 2 years ago

As discussed in #156, following #154 the Z3 logical contexts are never garbage collected. This PR fixes this by adding a finalizer to the logical context pointer.

qaristote commented 2 years ago

I'm also thinking this might be the right time to add some tests, in particular one that calls the finalizer on a context and checks that it has indeed been garbage collected.