fixed memory leak
This commit is contained in:
@@ -603,7 +603,9 @@ void Application::onGraphics(RenderDevice* rd) {
|
||||
glEnableClientState(GL_VERTEX_ARRAY);
|
||||
glEnableClientState(GL_COLOR_ARRAY);
|
||||
glEnableClientState(GL_NORMAL_ARRAY);
|
||||
//if(_dataModel->getWorkspace() != NULL)
|
||||
_dataModel->getWorkspace()->render(rd);
|
||||
//else throw std::exception("Workspace not found");
|
||||
glDisableClientState(GL_VERTEX_ARRAY);
|
||||
glDisableClientState(GL_COLOR_ARRAY);
|
||||
glDisableClientState(GL_NORMAL_ARRAY);
|
||||
|
||||
@@ -62,7 +62,12 @@ void GUDButtonListener::onButton1MouseClick(BaseButtonInstance* button)
|
||||
if(g_selectedInstances.at(i)->canDelete)
|
||||
{
|
||||
if(GroupInstance* model = dynamic_cast<GroupInstance*>(g_selectedInstances.at(i)))
|
||||
{
|
||||
newinst = model->unGroup();
|
||||
model->setParent(NULL);
|
||||
delete model;
|
||||
model = NULL;
|
||||
}
|
||||
}
|
||||
/*tempinst->setPosition(Vector3(tempPos.x, tempPos.y + tempSize.y, tempPos.z));
|
||||
g_usableApp->cameraController.centerCamera(g_selectedInstances.at(0));*/
|
||||
|
||||
Reference in New Issue
Block a user