/// <summary> /// Release the unmanaged resource /// </summary> protected override void DisposeObject() { if (_ptr != IntPtr.Zero) { ArucoInvoke.cveArucoDictionaryRelease(ref _ptr, ref _sharedPtr); } }
/// <summary> /// Release the unmanaged resource /// </summary> protected override void DisposeObject() { if (_predefined) { //no need to release any object here. //The dictionary is static global in C++ code _ptr = IntPtr.Zero; } else { if (_ptr != IntPtr.Zero) { ArucoInvoke.cveArucoDictionaryRelease(ref _ptr); } } }