[New-bugs-announce] [issue12142] Circular reference when importing ctypes

poq report at bugs.python.org
Sun May 22 00:39:48 CEST 2011

New submission from poq <poq at gmx.com>:

When importing ctypes after gc.set_debug(gc.DEBUG_LEAK), the garbage collector finds a 'c_int_Array_3' class and some related objects.

The class is created in ctypes/_endian.py:
_array_type = type(c_int * 3)

It seems that this could be avoided with:
_array_type = type(Array)

Of course, I realize this is not a bug because normally it will just get collected. It is just an extremely minor annoyance because this is currently the only thing still found by DEBUG_LEAK for my program ;)

components: ctypes
messages: 136485
nosy: poq
priority: normal
severity: normal
status: open
title: Circular reference when importing ctypes
type: resource usage
versions: Python 3.3

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list