MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / freeInsanePointer

Function freeInsanePointer

src/misc/memory_model.cpp:41–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39 }
40
41 void freeInsanePointer ( void * ptr ) {
42 lock_guard<mutex> lock(g_insane_mutex);
43 auto it = g_insane_pointers.find(ptr);
44 if ( it != g_insane_pointers.end() ) {
45 g_insane_pointers.erase(it);
46 } else {
47 DAS_FATAL_ERROR("freeing insane pointer %p, which was not allocated", ptr);
48 }
49 }
50
51 #define INSCRIBE_INSANE_POINTER(ptr,model) inscribeInsanePointer(ptr,model)
52 #define FREE_INSANE_POINTER(ptr) freeInsanePointer(ptr)

Callers

nothing calls this directly

Calls 3

findMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected