protected virtual void Dispose(bool disposing) { if (m_native != null) { Native.IBlock localNative = m_native; m_native = null; localNative.Release(); } if (m_nativeRef != IntPtr.Zero) { Registration.removeObject(m_nativeRef); m_nativeRef = IntPtr.Zero; } }
public CppProxyBlock(signals.IBlockDriver driver, signals.IBlock parent, IntPtr native) { if (driver == null) throw new ArgumentNullException("driver"); if (native == IntPtr.Zero) throw new ArgumentNullException("native"); m_nativeRef = native; m_driver = driver; m_parent = parent; Registration.storeObject(native, this); m_native = (Native.IBlock)CppNativeProxy.CreateCallout(native, typeof(Native.IBlock)); interrogate(); }