MCPcopy Create free account
hub / github.com/HaxeFoundation/hxcpp / HXTReclaimInternal

Method HXTReclaimInternal

src/hx/Telemetry.cpp:234–251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

232 }
233
234 static void HXTReclaimInternal(void* obj)
235 {
236 int obj_id = __hxt_ptr_id(obj);
237 std::map<void*, hx::Telemetry*>::iterator exist = alloc_map.find(obj);
238 if (exist != alloc_map.end()) {
239 Telemetry* telemetry = exist->second;
240 if (telemetry) {
241 telemetry->reclaim(obj_id);
242 alloc_map.erase(exist);
243 //printf("Tracking collection %016lx, id=%016lx\n", obj, obj_id);
244 } else {
245 printf("HXT ERR: we shouldn't get: Telemetry lookup failed!\n");
246 }
247 } else {
248 // Ignore, assume object was already reclaimed
249 //printf("HXT ERR: we shouldn't get: Reclaim a non-tracked object %016lx, id=%016lx -- was there an object ID collision?\n", obj, obj_id);
250 }
251 }
252
253 static void HXTAfterMark(int gByteMarkID, int ENDIAN_MARK_ID_BYTE)
254 {

Callers

nothing calls this directly

Calls 4

__hxt_ptr_idFunction · 0.85
findMethod · 0.80
eraseMethod · 0.80
reclaimMethod · 0.45

Tested by

no test coverage detected