/// <summary> /// For IDisposable /// </summary> /// <param name="fDisposing"></param> protected virtual void Dispose(bool fDisposing) { if (fDisposing && !disposed) { _array.Dispose(); disposed = true; // the _texref reference is not destroyed explicitly, as it is done automatically when module is unloaded } if (!fDisposing && !disposed) { Debug.WriteLine(String.Format("ManagedCUDA not-disposed warning: {0}", this.GetType())); } }
/// <summary> /// For IDisposable /// </summary> /// <param name="fDisposing"></param> protected virtual void Dispose(bool fDisposing) { if (fDisposing && !disposed) { if (_isOwner) { //Dispose the internal array only if it was created internally _array.Dispose(); } disposed = true; // the _surfref reference is not destroyed explicitly, as it is done automatically when module is unloaded } if (!fDisposing && !disposed) { Debug.WriteLine(String.Format("ManagedCUDA not-disposed warning: {0}", this.GetType())); } }