Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Garbage collector release method #50990

Closed
gardster mannequin opened this issue Aug 20, 2009 · 5 comments
Closed

Garbage collector release method #50990

gardster mannequin opened this issue Aug 20, 2009 · 5 comments
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement

Comments

@gardster
Copy link
Mannequin

gardster mannequin commented Aug 20, 2009

BPO 6741
Nosy @loewis, @vstinner
Superseder
  • bpo-1635741: Py_Finalize() doesn't clear all Python objects at exit
  • Files
  • patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2019-10-23.00:12:45.940>
    created_at = <Date 2009-08-20.12:38:30.430>
    labels = ['interpreter-core', 'type-feature']
    title = 'Garbage collector release method'
    updated_at = <Date 2019-10-23.00:12:45.938>
    user = 'https://bugs.python.org/gardster'

    bugs.python.org fields:

    activity = <Date 2019-10-23.00:12:45.938>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-10-23.00:12:45.940>
    closer = 'vstinner'
    components = ['Interpreter Core']
    creation = <Date 2009-08-20.12:38:30.430>
    creator = 'gardster'
    dependencies = []
    files = ['29463']
    hgrepos = []
    issue_num = 6741
    keywords = []
    message_count = 5.0
    messages = ['91772', '91788', '91802', '184545', '355188']
    nosy_count = 4.0
    nosy_names = ['loewis', 'vstinner', 'gardster', 'Satshabad.Khalsa']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '1635741'
    type = 'enhancement'
    url = 'https://bugs.python.org/issue6741'
    versions = ['Python 3.2']

    @gardster
    Copy link
    Mannequin Author

    gardster mannequin commented Aug 20, 2009

    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.

    @gardster gardster mannequin added interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement labels Aug 20, 2009
    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Aug 20, 2009

    Can you propose a patch?

    @gardster
    Copy link
    Mannequin Author

    gardster mannequin commented Aug 21, 2009

    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.

    @SatshabadKhalsa
    Copy link
    Mannequin

    SatshabadKhalsa mannequin commented Mar 18, 2013

    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.

    @vstinner
    Copy link
    Member

    That's basically a duplicate of bpo-1635741.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant