[New-bugs-announce] [issue6483] Modules are not deallocated correctly if m_size = -1

Julian Andres Klode report at bugs.python.org
Tue Jul 14 14:03:55 CEST 2009

New submission from Julian Andres Klode <jak at jak-linux.org>:

The documentation states that m_size should be -1 if no additional
memory is needed. But this causes the objects inside the module to not
be deallocated at all.

The attached module (test) stores an object of a type 'Test', which
prints "Deallocation is happening" in it's tp_dealloc. If m_size in the
TestModule is set to -1, this is never reached. If it is 0, it is reached.

components: Interpreter Core
files: test.c
messages: 90514
nosy: jak
severity: normal
status: open
title: Modules are not deallocated correctly if m_size = -1
type: behavior
versions: Python 3.1
Added file: http://bugs.python.org/file14500/test.c

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list