| 181 | } |
| 182 | |
| 183 | void 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 | } |
no test coverage detected