On Thu, May 06, 2010 at 12:11:16PM +0100, Giles Thomas wrote:
> On 6 May 2010 06:44, Jayesh Salvi <
jayes...@gmail.com> wrote:
>
> I am not certain if the Xorg memory hog is caused by my Webgl programs,
> but nonetheless I realized that my programs never call deleteBuffer on
> the VBO objects I allocate using gl.bufferData. I couldn't find them in
> learningwebgl tutorials as well (at least first 4 of them).
>
> Yup, my tutorials don't call deleteBuffer -- I'd been kind of assuming
> that the browser does it all for us when the page drops out of use. This
> part of the spec
> <
https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/doc/spec/WebGL-spec.html#3>
> seems to suggest that that should be the case, but (a) I may be
> misinterpreting it or (b) the browser might be buggy...
Thanks for the pointer.
This portion seems relevant...
"... When none of these conditions exist the user agent can, at any point,
delete the object using the equivalent of a delete call (e.g.,
deleteTexture). If authors wish to control when the underlying resource
is released then the delete call can be made explicitly."
IIUC the browser CAN delete the resources, but is not required to.
Fortunately the application itself can release these resources. We don't
know at this point if browser is doing the cleaning up. I will post if I
find something from my experiments with deleteBuffer in this regard.