Changes between Initial Version and Version 1 of Ticket #36137, comment 1


Ignore:
Timestamp:
Jan 25, 2025, 2:40:33 PM (4 days ago)
Author:
Simon Charette

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #36137, comment 1

    initial v1  
    1616> the response returned from the `c.get('/admin/')` call isn't stored anywhere and should be garbage collected, and it's not clear where the memory leak is.
    1717
    18 is likely a bad assumption and from looking at the output of `tracemalloc` it appears that `timeit.timeit` keeps references to frames which prevents `Client` instances assigned to `c` in them and their associated signal receivers from being adequately garbage collected.
     18is likely a bad assumption and from looking at the output of `tracemalloc` it appears that `timeit.timeit` keeps references to frames which prevents `c` and [https://github.com/django/django/blob/330d89d4fe7832355535580383523f1749a3ee45/django/test/client.py#L1077-L1085 it's weakref associated signal receivers registered on a request from being adequately garbage collected].
    1919
    2020If you can reproduce without involving `timeit.timeit` or demonstrate how Django is at fault please re-open.
Back to Top