dispose method
void
dispose()
Frees the GPU-related resources allocated by this instance. Call this method whenever this instance is no longer used in your app.
Material textures must be be disposed of by the dispose() method of Texture.
Implementation
void dispose() {
dispatchEvent(Event(type: "dispose"));
matcap?.dispose();
clearcoatMap?.dispose();
clearcoatRoughnessMap?.dispose();
clearcoatNormalMap?.dispose();
displacementMap?.dispose();
roughnessMap?.dispose();
metalnessMap?.dispose();
specularMap?.dispose();
specularIntensityMap?.dispose();
specularColorMap?.dispose();
sheenColorMap?.dispose();
gradientMap?.dispose();
sheenTintMap?.dispose();
sheenRoughnessMap?.dispose();
transmissionMap?.dispose();
thicknessMap?.dispose();
map?.dispose();
lightMap?.dispose();
aoMap?.dispose();
alphaMap?.dispose();
normalMap?.dispose();
bumpMap?.dispose();
envMap?.dispose();
emissiveMap?.dispose();
}