internal MonoBtlsX509LookupMono() : base(new BoringX509LookupMonoHandle(mono_btls_x509_lookup_mono_new())) { gch = GCHandle.Alloc(this); instance = GCHandle.ToIntPtr(gch); bySubjectFunc = OnGetBySubject; bySubjectFuncPtr = Marshal.GetFunctionPointerForDelegate(bySubjectFunc); mono_btls_x509_lookup_mono_init(Handle.DangerousGetHandle(), instance, bySubjectFuncPtr); }
internal MonoBtlsX509LookupMono () : base (new BoringX509LookupMonoHandle (mono_btls_x509_lookup_mono_new ())) { gch = GCHandle.Alloc (this); instance = GCHandle.ToIntPtr (gch); bySubjectFunc = OnGetBySubject; bySubjectFuncPtr = Marshal.GetFunctionPointerForDelegate (bySubjectFunc); mono_btls_x509_lookup_mono_init (Handle.DangerousGetHandle (), instance, bySubjectFuncPtr); }
protected override void Close() { try { if (gch.IsAllocated) { gch.Free(); } } finally { instance = IntPtr.Zero; bySubjectFunc = null; bySubjectFuncPtr = IntPtr.Zero; base.Close(); } }
protected override void Close () { try { if (gch.IsAllocated) gch.Free (); } finally { instance = IntPtr.Zero; bySubjectFunc = null; bySubjectFuncPtr = IntPtr.Zero; base.Close (); } }