Exemplo n.º 1
0
void SpriteData::Cleanup()
{
	for (int cellIndex = 0; cellIndex < cells.GetSize(); cellIndex++)
	{
		SpriteCell *cell = &cells[cellIndex];

#if USE_HAVOK_PHYSICS_2D
		if (cell->shape != NULL)
		{
			VASSERT(cell->shape->getReferenceCount() == 1);
			cell->shape->removeReference();
			cell->shape = NULL;
		}

		if (cell->shape3d != NULL)
		{
			VASSERT(cell->shape3d->getReferenceCount() == 1);
			cell->shape3d->removeReference();
			cell->shape3d = NULL;
		}
#endif // USE_HAVOK_PHYSICS_2D
	}

	cells.RemoveAll();
	states.RemoveAll();
	stateNameToIndex.Reset();

	V_SAFE_RELEASE(textureAnimation);
	V_SAFE_RELEASE(spriteSheetTexture);
}
VTerrainSectorRenderLoop::~VTerrainSectorRenderLoop()
{
#if ( defined(_VR_DX9) && defined(WIN32) )
  V_SAFE_RELEASE(pLockableSurface);
  V_SAFE_RELEASE(pLockableTexture);
  V_SAFE_RELEASE(pRenderTarget);
  V_SAFE_RELEASE(pSurface);
  V_SAFE_RELEASE(pTexture);
#endif
}
 /// \brief
 ///   Destructor
 VOVERRIDE ~VisDebugShadingRenderLoop_cl()
 {
   V_SAFE_RELEASE(m_pMultiVisZoneTex);
 }