releaseMaterialProgramReferences method

void releaseMaterialProgramReferences(
  1. Material material
)

Implementation

void releaseMaterialProgramReferences(Material material) {
  var programs = properties.get(material)["programs"];

  if (programs != null) {
    programs.forEach((key, program) {
      programCache.releaseProgram(program);
    });

    if (material is ShaderMaterial) {
      programCache.releaseShaderCache(material);
    }
  }
}