protected void ClearCreatedObjects() { for (int i = 0; i < sceneNodeList.Count; i++) { SceneNode node = sceneNodeList[i]; Entity entity = entityList[i]; node.DetachObject(entity); scene.RemoveEntity(entity); node.RemoveFromParent(); } sceneNodeList.Clear(); entityList.Clear(); foreach (Material material in materialList) { material.Dispose(); MaterialManager.Instance.Unload(material); } materialList.Clear(); foreach (Texture texture in textureList) { texture.Dispose(); TextureManager.Instance.Unload(texture); } textureList.Clear(); totalVertexCount = 0; }