protected override void DisposeObject() { CvInvoke.cvReleaseStructuringElement(ref _ptr); if (_handle.IsAllocated) _handle.Free(); }