MCPcopy Create free account
hub / github.com/libgit2/git2go / Clear

Method Clear

handles.go:48–55  ·  view source on GitHub ↗

Clear stops tracking all the managed pointers.

()

Source from the content-addressed store, hash-verified

46
47// Clear stops tracking all the managed pointers.
48func (v *HandleList) Clear() {
49 v.Lock()
50 for handle := range v.handles {
51 delete(v.handles, handle)
52 C.free(handle)
53 }
54 v.Unlock()
55}
56
57// Get retrieves the pointer from the given handle
58func (v *HandleList) Get(handle unsafe.Pointer) interface{} {

Callers

nothing calls this directly

Calls 1

freeMethod · 0.80

Tested by

no test coverage detected