#36939: Connecting the same signal multiple times with weak=True allocates new
memory that is never deallocated
-------------------------------------+-------------------------------------
Reporter: phantom-jacob | Owner: Juho
| Hautala
Type: Bug | Status: closed
Component: Core (Other) | Version: 6.0
Severity: Normal | Resolution: fixed
Keywords: signal connect weak | Triage Stage: Ready for
weakref | checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jacob Walls <jacobtylerwalls@…>):
* resolution: => fixed
* status: assigned => closed
Comment:
In [changeset:"ba4751e0ca558dd8f0d9e6153bec4280289ca2f4" ba4751e]:
{{{#!CommitTicketReference repository=""
revision="ba4751e0ca558dd8f0d9e6153bec4280289ca2f4"
Fixed #36939 -- Avoided weakref.finalize in Signal.connect().
Replaced weak receiver registration in Signal.connect() to pass
_flag_dead_receivers directly as the callback for weakref.ref() and
weakref.WeakMethod() instead of creating weakref.finalize() objects.
This prevented finalizer accumulation in repeated weak
connect()/disconnect() cycles where receivers remain alive.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/36939#comment:6>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/0107019cfda0db68-6e373b59-2609-4cc9-9ecb-2fa44cef2368-000000%40eu-central-1.amazonses.com.