Free releases all resources used by the RegisteredSmartTransport and unregisters the custom transport definition referenced by it.
()
| 279 | // Free releases all resources used by the RegisteredSmartTransport and |
| 280 | // unregisters the custom transport definition referenced by it. |
| 281 | func (t *RegisteredSmartTransport) Free() error { |
| 282 | runtime.LockOSThread() |
| 283 | defer runtime.UnlockOSThread() |
| 284 | |
| 285 | cstr := C.CString(t.name) |
| 286 | defer C.free(unsafe.Pointer(cstr)) |
| 287 | |
| 288 | if ret := C.git_transport_unregister(cstr); ret < 0 { |
| 289 | return MakeGitError(ret) |
| 290 | } |
| 291 | |
| 292 | pointerHandles.Untrack(t.handle) |
| 293 | runtime.SetFinalizer(t, nil) |
| 294 | t.handle = nil |
| 295 | return nil |
| 296 | } |
| 297 | |
| 298 | //export smartTransportCallback |
| 299 | func smartTransportCallback( |