Issue 6741: Garbage collector release method (original) (raw)

Issue6741

Created on 2009-08-20 12:38 by gardster, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
patch Satshabad.Khalsa,2013-03-18 22:57
Messages (5)
msg91772 - (view) Author: Lev (gardster) Date: 2009-08-20 12:38
WinCRT debug detects several memory leaks after calling py_Initialize (); py_Finalize(); functions. Most of them are garbage collector visible python's objects. I suggest to create "release" method in garbage collector which will distruct all objects in GC list without reference count checking, and call this method at the end of py_Finalize () function. I think, that it will help to avoid memory leaks after calling py_Finalize() function.
msg91788 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2009-08-20 22:00
Can you propose a patch?
msg91802 - (view) Author: Lev (gardster) Date: 2009-08-21 06:15
I,m trying to develop this patch now, but I'm facing the challenge (wrong ref_count or list corruption in dict objects). If I can solve it, I publish patch here.
msg184545 - (view) Author: Satshabad Khalsa (Satshabad.Khalsa) Date: 2013-03-18 22:57
This is a test that is supposed to run c that creates two objects, cross references them with embedded python DECREF's the objects. Then it asserts that after Py_fini is called, they have no more references because the gc should have collected them. Unfortunately the test is not failing for the right reasons and I can't figure out why.
msg355188 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-10-23 00:12
That's basically a duplicate of bpo-1635741.
History
Date User Action Args
2022-04-11 14:56:52 admin set github: 50990
2019-10-23 00:12:45 vstinner set status: open -> closedsuperseder: Py_Finalize() doesn't clear all Python objects at exitnosy: + vstinnermessages: + resolution: duplicatestage: test needed -> resolved
2013-03-18 22:57:26 Satshabad.Khalsa set files: + patchnosy: + Satshabad.Khalsamessages: +
2010-07-10 06:57:46 terry.reedy set stage: test neededversions: + Python 3.2, - Python 2.6
2009-08-21 06:15:09 gardster set messages: +
2009-08-20 22:00:21 loewis set nosy: + loewismessages: +
2009-08-20 12:38:30 gardster create