예제 #1
0
 protected virtual void Dispose(bool disposing)
 {
     if (m_native != null)
     {
         Native.IFunction localNative = m_native;
         m_native = null;
         localNative.Release();
     }
     if (m_nativeRef != IntPtr.Zero)
     {
         Registration.removeObject(m_nativeRef);
         m_nativeRef = IntPtr.Zero;
     }
 }
예제 #2
0
 public CppProxyFunction(signals.IFunctionSpec spec, IntPtr native)
 {
     if (spec == null) throw new ArgumentNullException("spec");
     if (native == IntPtr.Zero) throw new ArgumentNullException("native");
     m_nativeRef = native;
     m_spec = spec;
     Registration.storeObject(native, this);
     m_native = (Native.IFunction)CppNativeProxy.CreateCallout(native, typeof(Native.IFunction));
 }