示例#1
0
 /// <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()));
     }
 }
示例#2
0
 /// <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()));
     }
 }