/// <summary> /// リソースの解放 /// </summary> /// <param name="disposing"> /// trueの場合は、このメソッドがユーザコードから直接が呼ばれたことを示す。マネージ・アンマネージ双方のリソースが解放される。 /// falseの場合は、このメソッドはランタイムからファイナライザによって呼ばれ、もうほかのオブジェクトから参照されていないことを示す。アンマネージリソースのみ解放される。 ///</param> #else /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing"> /// If disposing equals true, the method has been called directly or indirectly by a user's code. Managed and unmanaged resources can be disposed. /// If false, the method has been called by the runtime from inside the finalizer and you should not reference other objects. Only unmanaged resources can be disposed. /// </param> #endif protected override void Dispose(bool disposing) { if (!disposed) { try { if (disposing) { } if (IsEnabledDispose) { if (objectPtr != null) { objectPtr.Dispose(); } objectPtr = null; ptr = IntPtr.Zero; } disposed = true; } finally { base.Dispose(disposing); } } }
/// <summary> /// リソースの解放 /// </summary> /// <param name="disposing"> /// trueの場合は、このメソッドがユーザコードから直接が呼ばれたことを示す。マネージ・アンマネージ双方のリソースが解放される。 /// falseの場合は、このメソッドはランタイムからファイナライザによって呼ばれ、もうほかのオブジェクトから参照されていないことを示す。アンマネージリソースのみ解放される。 ///</param> #else /// <summary> /// Releases the resources /// </summary> /// <param name="disposing"> /// If disposing equals true, the method has been called directly or indirectly by a user's code. Managed and unmanaged resources can be disposed. /// If false, the method has been called by the runtime from inside the finalizer and you should not reference other objects. Only unmanaged resources can be disposed. /// </param> #endif protected override void Dispose(bool disposing) { if (!disposed) { try { // releases managed resources if (disposing) { if (ptrObj != null) { ptrObj.Dispose(); ptrObj = null; } } // releases unmanaged resources disposed = true; } finally { base.Dispose(disposing); } } }
/// <summary> /// リソースの解放 /// </summary> /// <param name="disposing"> /// trueの場合は、このメソッドがユーザコードから直接が呼ばれたことを示す。マネージ・アンマネージ双方のリソースが解放される。 /// falseの場合は、このメソッドはランタイムからファイナライザによって呼ばれ、もうほかのオブジェクトから参照されていないことを示す。アンマネージリソースのみ解放される。 ///</param> #else /// <summary> /// Releases the resources /// </summary> /// <param name="disposing"> /// If disposing equals true, the method has been called directly or indirectly by a user's code. Managed and unmanaged resources can be disposed. /// If false, the method has been called by the runtime from inside the finalizer and you should not reference other objects. Only unmanaged resources can be disposed. /// </param> #endif protected override void Dispose(bool disposing) { if (!disposed) { try { // releases managed resources if (disposing) { } // releases unmanaged resources if (detectorPtr != null) { detectorPtr.Dispose(); detectorPtr = null; } else { if (ptr != IntPtr.Zero) { NativeMethods.features2d_DenseFeatureDetector_delete(ptr); } ptr = IntPtr.Zero; } disposed = true; } finally { base.Dispose(disposing); } } }
/// <summary> /// リソースの解放 /// </summary> /// <param name="disposing"> /// trueの場合は、このメソッドがユーザコードから直接が呼ばれたことを示す。マネージ・アンマネージ双方のリソースが解放される。 /// falseの場合は、このメソッドはランタイムからファイナライザによって呼ばれ、もうほかのオブジェクトから参照されていないことを示す。アンマネージリソースのみ解放される。 ///</param> #else /// <summary> /// Releases the resources /// </summary> /// <param name="disposing"> /// If disposing equals true, the method has been called directly or indirectly by a user's code. Managed and unmanaged resources can be disposed. /// If false, the method has been called by the runtime from inside the finalizer and you should not reference other objects. Only unmanaged resources can be disposed. /// </param> #endif protected override void Dispose(bool disposing) { if (!disposed) { try { // releases managed resources if (disposing) { } // releases unmanaged resources if (IsEnabledDispose) { if (detectorPtr != null) { detectorPtr.Dispose(); } detectorPtr = null; ptr = IntPtr.Zero; } disposed = true; } finally { base.Dispose(disposing); } } }
/// <summary> /// リソースの解放 /// </summary> /// <param name="disposing"> /// trueの場合は、このメソッドがユーザコードから直接が呼ばれたことを示す。マネージ・アンマネージ双方のリソースが解放される。 /// falseの場合は、このメソッドはランタイムからファイナライザによって呼ばれ、もうほかのオブジェクトから参照されていないことを示す。アンマネージリソースのみ解放される。 ///</param> #else /// <summary> /// Releases the resources /// </summary> /// <param name="disposing"> /// If disposing equals true, the method has been called directly or indirectly by a user's code. Managed and unmanaged resources can be disposed. /// If false, the method has been called by the runtime from inside the finalizer and you should not reference other objects. Only unmanaged resources can be disposed. /// </param> #endif protected override void Dispose(bool disposing) { if (!disposed) { try { // releases managed resources if (disposing) { } // releases unmanaged resources if (IsEnabledDispose) { //UFIX //ptrObj?.Dispose(); if (ptrObj != null) { ptrObj.Dispose(); } ptrObj = null; ptr = IntPtr.Zero; } disposed = true; } finally { base.Dispose(disposing); } } }
/// <summary> /// リソースの解放 /// </summary> /// <param name="disposing"> /// trueの場合は、このメソッドがユーザコードから直接が呼ばれたことを示す。マネージ・アンマネージ双方のリソースが解放される。 /// falseの場合は、このメソッドはランタイムからファイナライザによって呼ばれ、もうほかのオブジェクトから参照されていないことを示す。アンマネージリソースのみ解放される。 ///</param> #else /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing"> /// If disposing equals true, the method has been called directly or indirectly by a user's code. Managed and unmanaged resources can be disposed. /// If false, the method has been called by the runtime from inside the finalizer and you should not reference other objects. Only unmanaged resources can be disposed. /// </param> #endif protected override void Dispose(bool disposing) { if (!disposed) { try { if (disposing) { if (ptrObj != null) { ptrObj.Dispose(); ptrObj = null; } } ptr = IntPtr.Zero; disposed = true; } finally { base.Dispose(disposing); } } }
/// <summary> /// Releases managed resources /// </summary> protected override void DisposeManaged() { ptrObj?.Dispose(); ptrObj = null; base.DisposeManaged(); }