Пример #1
0
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;
}
Пример #2
0
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;
}
Пример #3
0
/*
==============
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;
}
Пример #4
0
/*
============
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 ) );
}
Пример #5
0
/*
============
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;
	}
}
Пример #6
0
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;
}