Skip to content

Conversation

erwincoumans
Copy link

@erwincoumans erwincoumans commented Feb 28, 2020

… Visual Studio, checked using Visual Leak Detector, https://kinddragon.github.io/vld)

This patch uses Py_AtExit to make sure memory is deallocated at the very end.
It may conflict with other platforms/configurations (embedded etc).

The static PyModuleDef def2; assumes there is only one single PYBIND11_MODULE.
In case more modules are allowed, that part of the patch can be removed and a more fancy solution for that deallocation is needed.

These leaks are similar to Issue #2062
However, in my case I'm seeing memory leaks just using a simple plain Python plugin using pybind11 (not embedded).

… Visual Studio, checked using Visual Leak Detector, https://kinddragon.github.io/vld)

This patch uses Py_AtExit to make sure it is called at the very end. It may conflict with other platforms/configurations (embedded etc).
@erwincoumans
Copy link
Author

Closing, this may be a Windows only issue (looking at the CI errors)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant