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