This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author amaury.forgeotdarc
Recipients amaury.forgeotdarc
Date 2008-08-24.20:54:58
SpamBayes Score 1.4609845e-06
Marked as misclassified No
Message-id <1219611300.04.0.860759707504.issue3667@psf.upfronthosting.co.za>
In-reply-to
Content
With python2.6, reloading extension modules does not always leak memory:

Python 2.6b2+ (trunk, Aug 19 2008, 23:45:24) [MSC v.1500 32 bit (Intel)]
on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
[34467 refs]
>>> import audioop; del sys.modules['audioop']
[34677 refs]
>>> import audioop; del sys.modules['audioop']
[34677 refs]

But with 3.0, reloading audioop leaks 60 references every time (seen in
test_unittest):

Python 3.0b3+ (py3k, Aug 24 2008, 21:56:40) [MSC v.1500 32 bit (Intel)]
on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
[42018 refs]
>>> import audioop; del sys.modules['audioop']
[42257 refs]
>>> import audioop; del sys.modules['audioop']
[42317 refs]
>>> import audioop; del sys.modules['audioop']
[42377 refs]
>>> import audioop; del sys.modules['audioop']
[42437 refs]
>>> import audioop; del sys.modules['audioop']
[42497 refs]

OK, many things cannot be reinitialized for C-written modules (static
variables &co), this is not the case for audioop. Furthermore, I thought
that the new module API was to support proper cleanup of modules
History
Date User Action Args
2008-08-24 20:55:00amaury.forgeotdarcsetrecipients: + amaury.forgeotdarc
2008-08-24 20:55:00amaury.forgeotdarcsetmessageid: <1219611300.04.0.860759707504.issue3667@psf.upfronthosting.co.za>
2008-08-24 20:54:59amaury.forgeotdarclinkissue3667 messages
2008-08-24 20:54:59amaury.forgeotdarccreate