[issue7959] ctypes memory leak

2010-02-23 Thread Thomas Heller
Thomas Heller thel...@ctypes.org added the comment: CThunkObject is not registered correctly with the cycle GC. The attached patch, against trunk, fixes the issue. -- keywords: +patch Added file: http://bugs.python.org/file16345/issue7957.patch ___

[issue7959] ctypes memory leak

2010-02-18 Thread Thomas Heller
New submission from Thomas Heller thel...@ctypes.org: This little script 'ctypes-leak.py' leaks memory: import gc from ctypes import * PROTO = WINFUNCTYPE(None) class Test(object): def func(self): pass def __init__(self): self.v = PROTO(self.func) while 1: try: