On Tue, Jun 28, 2011 at 8:16 PM, Gregg Tavares (wrk) <firstname.lastname@example.org>
GC happens all the time, not merely when under memory pressure.Â If a browser runs my 8GB system out of memory before it tries to GC, something has gone catastrophically wrong.
If you want a solution fine. My point was the thing you were suggesting (weak references on WebGL resources from the WebGLContext) is not a solution. You want a solution then argue for something that would actually solve the problem (like the 3 suggestions I gave)
It's a solution to the problem of objects being kept alive forever if the user drops all references to it.Â It's a straightforward reference leak, which prevents the object from being collected at all, for the entire lifetime of the context.Â It isn't a matter of recovering from allocation failures, or of guaranteeing that objects will be released "in time" for something else, but of simply allowing object cleanup to happen in the normal course of GC.