[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyKDE] Model indexes and internal pointers
From:       "Arve Knudsen" <arve.knudsen () gmail ! com>
Date:       2006-07-17 21:09:09
Message-ID: a0d6258d0607171409r63ee553g337894acd964c189 () mail ! gmail ! com
[Download RAW message or body]

On 7/17/06, Andreas Pakulat <apaku@gmx.de> wrote:
> On 17.07.06 22:00:41, Arve Knudsen wrote:
> > Ok, I found the original thread. There is no explanation as to why no
> > extra reference is kept however.
>
> I don't know too much about python refcounting, but I think one problem
> could be what to do if the model index disappears. Also decrease the
> reference count? This could lead to a problem if "something" else still
> needs the object... Phil needs to answer this.

When the model index is destroyed, it should decrease the reference
count seems like the obvious answer. If the object is referred to
elsewhere its reference count should reflect this.

> > There might be a good reason for this
> > behaviour, but it does represent a rather nasty pitfall.
>
> Well, that's probably a reason why it was introduced so late, you had to
> use internalId before.

My impression from reading the thread is that it was non-trivial to
implement, but added out of a real need, expressed by users.

Arve

_______________________________________________
PyKDE mailing list    PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic