remove()

Deletes the framebuffer from GPU memory.

Calling myBuffer.remove() frees the GPU memory used by the framebuffer. The framebuffer also uses a bit of memory on the CPU which can be freed like so:

// Delete the framebuffer from GPU memory.
myBuffer.remove();

// Delete the framebuffer from CPU memory.
myBuffer = undefined;

Note: All variables that reference the framebuffer must be assigned the value undefined to delete the framebuffer from CPU memory. If any variable still refers to the framebuffer, then it won't be garbage collected.

उदाहरण

This page is generated from the comments in src/webgl/p5.Framebuffer.js . Please feel free to edit it and submit a pull request!

संबंधित संदर्भ