Skip to content

According to the documentation of module m_clear, is it correct that xxlimited module lacks m_free? Will there be a memory leak? #109079

Open
@JunyiXie

Description

@JunyiXie

/* m_free is not necessary here: xx_clear clears all references,

Screenshot 2023-09-07 at 20 47 49

Screenshot 2023-09-07 at 20 43 03

Like PyTypeObject.tp_clear, this function is not always called before a module is deallocated. For example, when reference counting is enough to determine that an object is no longer used, the cyclic garbage collector is not involved and m_free is called directly.

According to the documentation of module m_clear, is it correct that xxlimited module lacks m_free? Will there be a memory leak?
when "the cyclic garbage collector is not involved and m_free is called directly.", Error_Type and Xxo_Type maybe leak?

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions