Opened 17 years ago
Closed 16 years ago
#598 closed Patches (Accepted)
Explicitly delete registered converter chains
Reported by: | kbluck | Owned by: | david_abrahams |
---|---|---|---|
Milestone: | Component: | python USE GITHUB | |
Version: | None | Severity: | |
Keywords: | Cc: |
Description
While working with boost.python, I've noted that instantiating most specializations of boost::python::extract<> results in MSVC leak reports. My usual tactic for third-party libraries in such cases is to suppress the CRT tracking for the affected code. This is how I deal with the abundant "leaks" from Python due to not calling Py_Finalize(), for example. In this case, though, the allocations are pre-main() and I can't get a suppression hook in ahead of it. I realize that these aren't true leaks, and that there is some reluctance to ferret out such situations at the moment due to the lack of support for Py_Finalize(), but this generates a *lot* of leak reports and makes it very difficult to recognize true leaks. It was actually making me consider not using extract<> at all. I realized that was an overreaction, so instead I added a destructor for struct boost::python::converter::registration that explicitly walks and deletes the singly-linked list nodes contained therein. This resolved my current flurry of extract<>-related leak reports.
Note:
See TracTickets
for help on using tickets.