Are WebGL objects garbage collected?

后端 未结 2 2010
情歌与酒
情歌与酒 2020-12-21 09:15

In JavaScript memory that I allocated (e.g. an ArrayBuffer) gets freed up when I don\'t have any reference to it anymore by the GC as I understood that right?

WebGL

2条回答
  •  粉色の甜心
    2020-12-21 09:46

    Yes


    From spec

    Note that underlying GL object will be automatically marked for deletion when the JS object is destroyed


    But you should notice that the object would probably not destroyed at the time you give up the last reference, so it's still a good practice to call deleteBuffer.

提交回复
热议问题