[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] Inconsistent gc behavior for reference cycles introduced by connections to lambda
From: Phil Thompson <phil () riverbankcomputing ! com>
Date: 2018-03-27 17:40:36
Message-ID: 32247D91-64ED-41DF-8632-E0B075F6C8C3 () riverbankcomputing ! com
[Download RAW message or body]
On 26 Mar 2018, at 12:57 pm, Ales Erjavec <ales.erjavec324@gmail.com> wrote:
>
> Hi,
>
> There appears to be inconsistency in traversing and GC-ing of some QObject
> derived classes.
>
> For instance connecting `QObject.objectNameChanged` signal to a lambda
> (capturing
> the the QObject instance), lists that lambda in the `gc.get_referents`
> (assuming as
> implemented by %GCTraverseCode in qobject.sip). Deleting a reference
> for the object
> and invoking `gc.collect` successfully disposes of the ref cycle.
>
> However for QAbstractItemModel subclasses (QStringListModel,
> QStandardListModel, ...)
> this is not the case. They do no list the lambda slots in
> `gc.get_referents` and leak the
> reference cycle.
Should be fixed in tonight's SIP snapshot.
Thanks (especially for the good test script),
Phil
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic