예제 #1
0
void freeDll(void)
{
	
	int i;
	Variable *var;


	//Poistettaan kaikki muuttujat
	for (i = 1; i != mVariableHandler.mSize;i++)
	{
		var = mVariableHandler.mPtrArray[i];
		if (var != NULL)
		{
			switch(var->mType)
			{
			case VarTypeBody:
				cpBodyFree((cpBody*)var->mPtr);break;
			case VarTypeShape:
				cpShapeFree((cpShape*)var->mPtr);break;
			case VarTypeConstraint:
				cpConstraintFree((cpConstraint*)var->mPtr);break;
			case VarTypeDataArray:
				daFree((DataArray*)var->mPtr);break;
			}
		}
	}

	//Tuhotaan ne kaikki...
	vhDestroy(&mVariableHandler);
	cpSpaceDestroy(&mSpace);
	mState = Unloaded;
}
예제 #2
0
void
cpSpaceFree(cpSpace *space)
{
	if(space){
		cpSpaceDestroy(space);
		cpfree(space);
	}
}
예제 #3
0
void
cpSpaceFree(cpSpace *space)
{
	if(space) cpSpaceDestroy(space);
	free(space);
}
예제 #4
0
파일: world.cpp 프로젝트: damir00/zac
World::~World() {
	cpSpaceDestroy(space);
}