MCPcopy Create free account
hub / github.com/JACoders/OpenJK / Cvar_FreeString

Function Cvar_FreeString

code/qcommon/cvar.cpp:48–54  ·  view source on GitHub ↗

If the string came from the memory pool, don't really free it. The entire memory pool will be wiped during the next level load.

Source from the content-addressed store, hash-verified

46//If the string came from the memory pool, don't really free it. The entire
47//memory pool will be wiped during the next level load.
48static void Cvar_FreeString(char *string)
49{
50 if(!lastMemPool || string < lastMemPool ||
51 string >= lastMemPool + memPoolSize) {
52 Z_Free(string);
53 }
54}
55
56/*
57================

Callers 5

Cvar_GetFunction · 0.70
Cvar_Set2Function · 0.70
Cvar_SetCheatStateFunction · 0.70
Cvar_UnsetFunction · 0.70
Cvar_ReallocFunction · 0.70

Calls 1

Z_FreeFunction · 0.70

Tested by

no test coverage detected