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 1 year ago

qaristote commented 1 year 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 1 year 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.