Skip to content

Memory leak with C-extension? #6

@alvinchow86

Description

@alvinchow86

I suspect there might be a memory leak with the C-extension verion of Proxy. I have some code (in a Django app) which creates a large number of Proxy objects that point to simple Python objects (larg-ish strings). These objects are placed into a list which is periodically cleared (after they are "consumed" by application code), so they should be garbage-allocated. However, I noticed that my Python process started growing continually (from about 300mb to 1gb to 2gb, and so on).

I then switched to the "simple" and the "slots" Python implementations and the memory issues went away (my process memory usage would fluctuate up and down but remain pretty stable).

Would be happy to provide more details or try to create a test case! (It is also possible I'm doing something wrong in my code)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions