New submission from Jack Liu:
0
down vote
favorite
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.
But it is ok with python33.dll, the global variable can be destroyed when
calling PyDict_DelItemString to delete the module.
How to resolve the problem? Is there a workaround? I need to use python35.dll
and wish the global variable in a module can be released automatically when
call PyDict_DelItemString to delete the module.
Here is the python test code:
class Simple:
def __init__( self ):
print('Simple__init__')
def __del__( self ):
print('Simple__del__')
simple = Simple()
----------
components: Library (Lib)
messages: 276945
nosy: Jack Liu
priority: normal
severity: normal
status: open
title: Python 3.5.1 C API, the global available available is not destroyed when
delete the module
type: behavior
versions: Python 3.5
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue28202>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com