void VM_Free(vm_t *vm) { if (vm->dllHandle) { Sys_UnloadDll(vm->dllHandle); Com_Memset(vm, 0, sizeof(*vm)); } #if 0 // now automatically freed by hunk if (vm->codeBase) { Z_Free(vm->codeBase); } if (vm->dataBase) { Z_Free(vm->dataBase); } if (vm->instructionPointers) { Z_Free(vm->instructionPointers); } #endif Com_Memset(vm, 0, sizeof(*vm)); currentVM = NULL; lastVM = NULL; }
void VM_Clear(void) { int i; for (i=0;i<MAX_VM; i++) { if ( vmTable[i].dllHandle ) { Sys_UnloadDll( vmTable[i].dllHandle ); } Com_Memset( &vmTable[i], 0, sizeof( vm_t ) ); } currentVM = NULL; lastVM = NULL; }
/* ============== VM_Free ============== */ void VM_Free( vm_t *vm ) { if ( vm->dllHandle ) { Sys_UnloadDll( vm->dllHandle ); Com_Memset( vm, 0, sizeof( *vm ) ); } Com_Memset( vm, 0, sizeof( *vm ) ); currentVM = NULL; lastVM = NULL; }
/* ============ CL_ShutdownRef ============ */ void CL_ShutdownRef( void ) { if ( !re.Shutdown ) { return; } re.Shutdown( qtrue ); if ( rendererLib != NULL ) { Sys_UnloadDll (rendererLib); rendererLib = NULL; } memset( &re, 0, sizeof( re ) ); }
/* ============ CL_ShutdownRef ============ */ static void CL_ShutdownRef( qboolean restarting ) { if ( re.Shutdown ) { re.Shutdown( qtrue, restarting ); } memset( &re, 0, sizeof( re ) ); if ( rendererLib != NULL ) { Sys_UnloadDll (rendererLib); rendererLib = NULL; } }
void VM_Free( vm_t *vm ) { if ( !vm ) return; // mark the slot as free vmTable[vm->slot] = NULL; if ( vm->dllHandle ) Sys_UnloadDll( vm->dllHandle ); memset( vm, 0, sizeof(*vm) ); Z_Free( vm ); currentVM = NULL; }