[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnash-dev] Garbage collector
From: |
strk |
Subject: |
Re: [Gnash-dev] Garbage collector |
Date: |
Fri, 15 Jun 2007 23:54:17 +0200 |
On Fri, Jun 15, 2007 at 03:45:45PM -0600, Eric Hughes wrote:
> At 02:18 PM 6/15/2007, strk wrote:
> >var o = new Object;
> >o.hello = function() { trace("hello"); }
> >Function.prototype.constructor = o;
> >delete o;
> >Function.prototype.constructor.helo(); // expect a trace
>
> Two issues: the reference outward from "constructor" and the references
> toward "o".
>
> First. The reference variable for "constructor" should be able to be hold
> either a weak or a strong reference, and it would be initialized to a weak
> reference. This means that in the ordinary case where constructor
> assignment does not occur, that the incremental RC mechanism will catch it,
> eliminating an item for the GC to deal with.
>
> Second. After assignment, "constructor" (an l-value) contains a strong
> reference to the r-value of "o". At this point both the variables "o" and
> "constructor" have references. Then when the variable "o" itself goes away
> (an l-value), "constructor" still has a strong reference.
>
> This was the kind of thing I mentioned earlier about possibility and
> feasibility. To use weak references in this way requires that r-values and
> l-values be separate, and I'm just not familiar enough with the VM
> implementation to know if this is already there or, if lacking, what
> requisite effort would be resolved.
Our l-values are just strings, and r-values are as_values (possibly objects, in
which case they are ref-counted).
--strk;
- [Gnash-dev] Garbage collector, strk, 2007/06/15
- Re: [Gnash-dev] Garbage collector, Hubert Figuiere, 2007/06/15
- Re: [Gnash-dev] Garbage collector, Udo Giacomozzi, 2007/06/15
- Re: [Gnash-dev] Garbage collector, Eric Hughes, 2007/06/15
- Re: [Gnash-dev] Garbage collector, strk, 2007/06/15
- Re: [Gnash-dev] Garbage collector, Eric Hughes, 2007/06/15
- Re: [Gnash-dev] Garbage collector, strk, 2007/06/15
- Re: [Gnash-dev] Garbage collector, strk, 2007/06/15
- Re: [Gnash-dev] Garbage collector, Eric Hughes, 2007/06/15
- Re: [Gnash-dev] Garbage collector,
strk <=
- Re: [Gnash-dev] Garbage collector, Eric Hughes, 2007/06/15
- Re: [Gnash-dev] Garbage collector, strk, 2007/06/16
Re: [Gnash-dev] Garbage collector, strk, 2007/06/15