public virtual void Dispose(bool disposing) { if (disposing) { // free any managed resources } // free any native resources }