dispose method

void dispose()
  • Disposes of the PMREMGenerator's internal memory. Note that PMREMGenerator is a static class,
  • so you should not need more than one PMREMGenerator object. If you do, calling dispose() on
  • one of them will cause any others to also become unusable.

Implementation

/// * Disposes of the PMREMGenerator's internal memory. Note that PMREMGenerator is a static class,
	/// * so you should not need more than one PMREMGenerator object. If you do, calling dispose() on
	/// * one of them will cause any others to also become unusable.
	/// *
void dispose() {
  if(_didDispose) return;
  _didDispose = true;
  _dispose();
  _cubemapMaterial?.dispose();
  _equirectMaterial?.dispose();
  _blurMaterial?.dispose();
  _pingPongRenderTarget?.dispose();

  _flatCamera.dispose();
  _oldTarget?.dispose();
  _axisDirections.clear();
  _renderer.dispose();  }