MCPcopy Create free account
hub / github.com/anjo76/angelscript / asSetGlobalMemoryFunctions

Function asSetGlobalMemoryFunctions

sdk/angelscript/source/as_memory.cpp:143–154  ·  view source on GitHub ↗

interface

Source from the content-addressed store, hash-verified

141
142// interface
143int asSetGlobalMemoryFunctions(asALLOCFUNC_t allocFunc, asFREEFUNC_t freeFunc)
144{
145 // Clean-up thread local memory before changing the allocation routines to avoid
146 // potential problem with trying to free memory using a different allocation
147 // routine than used when allocating it.
148 asThreadCleanup();
149
150 userAlloc = allocFunc;
151 userFree = freeFunc;
152
153 return 0;
154}
155
156// interface
157int asResetGlobalMemoryFunctions()

Callers 1

InstallMemoryManagerFunction · 0.85

Calls 1

asThreadCleanupFunction · 0.85

Tested by 1

InstallMemoryManagerFunction · 0.68