/// <summary> /// Release the unmanaged memory associated to this object /// </summary> protected override void DisposeObject() { CvInvoke.cvReleaseStructuringElement(ref _ptr); if (_handle.IsAllocated) { _handle.Free(); } }