releaseProgram method
Implementation
void releaseProgram(WebGLProgram program) {
if (--program.usedTimes == 0) {
// Remove from unordered set
final i = programs.indexOf(program);
programs[i] = programs[programs.length - 1];
programs.removeLast();
// Free WebGL resources
program.destroy();
}
}