private static void Free( IntPtr backend) { GCHandle gcHandle = GCHandle.FromIntPtr(Marshal.ReadIntPtr(backend, GitOdbBackend.GCHandleOffset)); OdbBackend odbBackend = gcHandle.Target as OdbBackend; if (odbBackend != null) { try { odbBackend.Dispose(); } catch (Exception ex) { Proxy.giterr_set_str(GitErrorCategory.Odb, ex); } } }
private static void Free( IntPtr backend) { OdbBackend odbBackend = MarshalOdbBackend(backend); if (odbBackend == null) { return; } try { odbBackend.Dispose(); } catch (Exception ex) { Proxy.giterr_set_str(GitErrorCategory.Odb, ex); } }