[New-bugs-announce] [issue12483] CThunkObject_dealloc should call PyObject_GC_UnTrack?

Ryan Kelly report at bugs.python.org
Mon Jul 4 02:56:40 CEST 2011

New submission from Ryan Kelly <ryan at rfk.id.au>:

According to the docs here:


Any object that uses PyObject_GC_Track in its constructor must call PyObject_GC_UnTrack in its deallocator.  The CThunkObject in _ctypes does the former but not the later.  Attached patch adds a call to PyObject_GC_UnTrack.

This doesn't fix any particular bug I was seeing, I just happened to be going through the _ctypes sources (you know, for fun...) and noticed this discrepancy.

components: ctypes
files: ctypes_gcuntrack.patch
keywords: patch
messages: 139724
nosy: rfk
priority: normal
severity: normal
status: open
title: CThunkObject_dealloc should call PyObject_GC_UnTrack?
versions: Python 3.3
Added file: http://bugs.python.org/file22560/ctypes_gcuntrack.patch

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list