On 03/11/2013, at 11:29, Bobby Holley wrote:
>
>
> What if we give script the ability to say "this Foo is semantically dead -
> please neuter cross-global references to it"? This is effectively what we
> have with Cu.nukeSandbox, and it works well. It doesn't in any way expose
> GC behavior, but it lets callers give the GC a much-needed boost, which the
> GC may subsequently leverage if it turns out to be useful.
How would that be?
x= y= {}
[object Object]
o= {x:x}
[object Object]
free(x)
true
typeof x
??
typeof y
??
typeof o.x
??
Or:
(function () {
function ƒ () {}
setTimeout(ƒ, 1000)
free(ƒ)
})()
?
When would be the right time to free(something)?
What would `something` be after the call to free(), null?
What if `something` isn't the only reference to the thing?
Would it be ok to null somebody else's references?
If not, what exactly would free(thing) do?
_______________________________________________
dev-tech-js-engine-internals mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals