MCPcopy Create free account
hub / github.com/BernardoGiordano/Checkpoint / ckpt_script_free

Function ckpt_script_free

common/script/scriptheap.cpp:183–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181}
182
183void ckpt_script_free(void* ptr)
184{
185 if (ptr && !ScriptHeap::get().release(ptr)) {
186 // A double free, or a free() of a pointer the script never owned (a
187 // borrowed json element, an interpreter-owned string). The real free()
188 // would corrupt the allocator; releaseAll() has the real blocks anyway.
189 Logging::warning("[script] free() of a pointer the script does not own, ignored");
190 }
191}
192}

Callers 1

StdlibFreeFunction · 0.85

Calls 3

getFunction · 0.85
warningFunction · 0.85
releaseMethod · 0.80

Tested by

no test coverage detected