MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / Free

Method Free

src/script/squirrel.cpp:143–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141 }
142
143 void Free(void *p, SQUnsignedInteger size)
144 {
145 if (p == nullptr) return;
146 this->allocator.deallocate(reinterpret_cast<uint8_t*>(p), size);
147 this->allocated_size -= size;
148
149#ifdef SCRIPT_DEBUG_ALLOCATIONS
150 assert(this->allocations.at(p) == size);
151 this->allocations.erase(p);
152#endif
153 }
154
155 ScriptAllocator()
156 {

Callers 3

ReallocMethod · 0.95
sq_vm_freeFunction · 0.45
AfterLoadVehiclesPhase1Function · 0.45

Calls 3

atMethod · 0.80
deallocateMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected