Note that there are tons of memory that is validly still alive when Python exists. As we've seen, trying to clean all that up /can/ have a big negative impact on shutdown. So I wouldn't worry about them. Insure labels them as (paraphrasing) "memory still allocated at exit", distinct from memory leaked. I think this is equivalent to Purify's "potentially leaked" and "leaked" memory respectively. Note that at least stringobject.c has a hook for clearing out all those interned strings at program shutdown time, which I added to clean up Insure's output. When INTERN_STRINGS is defined, the extra function _Py_ReleaseInternedStrings() is defined. Then, in Modules/main.c, in Py_Main(), if __INSURE__ is defined that function is called, so this memory doesn't show up in the report. It may be worthwhile generalizing this approach, and adding it to other static long-lived data structures, simply as an aid to memory debugging. As long as it isn't enabled by default, that should be fine. -Barry
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4