/// <summary> /// Releases the unmanaged resources used by an instance of the <see cref="WaterWaves"/> class /// and optionally releases the managed resources. /// </summary> /// <param name="disposing"> /// <see langword="true"/> to release both managed and unmanaged resources; /// <see langword="false"/> to release only unmanaged resources. /// </param> protected virtual void Dispose(bool disposing) { if (disposing) { DisplacementMap.SafeDispose(); DisplacementMap = null; NormalMap.SafeDispose(); NormalMap = null; } }