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

List:       kfm-devel
Subject:    Re: PATCH: kjs garbage colleciton
From:       Harri Porten <porten () trolltech ! com>
Date:       2001-07-24 15:30:07
[Download RAW message or body]

On Tue, 24 Jul 2001, Dirk Mueller wrote:

> There is one part I don't understand: why did you add a KJSO(foo) at #
> some places then? I mean, if the Imp was 
> never in a KJSO how can it then be selected for the garbage collection ?
> 
> now you added it to a KJSO and as soon as the lifetime of the KJSO temporary 
> object is over the refcount drops to zero. 
> 
> What am I missing here ?

Every new'ed Imp is registered (overloaded operator new()). If nobody
takes ownership it won't survive the next gc run. In the current
implementation this is done via mark()'ing it in the mark phase. Peter now
added the possibility to do this via parenting it with an KJSO wrapper
object.

Harri.

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

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