releaseMaterialProgramReferences method

void releaseMaterialProgramReferences(
  1. Material material
)

Implementation

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

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

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