On Mon, Sep 19, 2016 at 4:47 PM, dl l <ldlch...@gmail.com> wrote: > I have a app loading python35.dll. Use python API PyImport_AddModule > to run a py file. And use PyDict_DelItemString to delete the module. > There is a global vailable in the py file. The global variable is not > destroyed when calling PyDict_DelItemString to delete the module. That > cause the memory leak.
Does the module still exist in sys.modules? If so, it's not leaked - it's still in use. ChrisA -- https://mail.python.org/mailman/listinfo/python-list