MCPcopy Create free account
hub / github.com/ZeroIntensity/pointers.py / free

Method free

src/pointers/calloc.py:114–122  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

112
113 @handle
114 def free(self) -> None:
115 first = self[0]
116 first.ensure_valid()
117
118 for i in range(self._chunks): # using __iter__ breaks here
119 chunk = self._get_chunk_at(i)
120 chunk._freed = True
121
122 c_free(first.make_ct_pointer())
123
124
125def calloc(num: int, size: int) -> AllocatedArrayPointer:

Callers

nothing calls this directly

Calls 4

_get_chunk_atMethod · 0.95
c_freeFunction · 0.85
ensure_validMethod · 0.80
make_ct_pointerMethod · 0.45

Tested by

no test coverage detected