diff options
author | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-05-10 22:59:01 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-05-12 03:00:08 +0200 |
commit | 87e10bc6d15cb259d16611667c32c6842044e616 (patch) | |
tree | 3e53bbd736bb998d718d0f6f2f599ea033d83ff2 | |
parent | ed506c3763da099053d847dcf73d02b61cd99527 (diff) |
no need to call clear before destryozing a vector
Change-Id: Ic5013c100520e8949d687ce6b34b83405bdfaf0a
-rw-r--r-- | chart2/source/view/main/GL3DRenderer.cxx | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/chart2/source/view/main/GL3DRenderer.cxx b/chart2/source/view/main/GL3DRenderer.cxx index db1a9b870df0..5185d076831f 100644 --- a/chart2/source/view/main/GL3DRenderer.cxx +++ b/chart2/source/view/main/GL3DRenderer.cxx @@ -707,7 +707,6 @@ void OpenGL3DRenderer::RenderLine3D(Polygon3DInfo &polygon) glDrawArrays(GL_LINE_STRIP, 0, pointList->size()); glDisableVertexAttribArray(m_2DVertexID); glBindBuffer(GL_ARRAY_BUFFER, 0); - pointList->clear(); delete pointList; polygon.verticesList.pop_front(); } @@ -779,9 +778,7 @@ void OpenGL3DRenderer::RenderPolygon3D(Polygon3DInfo &polygon) glDisableVertexAttribArray(m_3DVertexID); glDisableVertexAttribArray(m_3DNormalID); glBindBuffer(GL_ARRAY_BUFFER, 0); - pointList->clear(); delete pointList; - normalList->clear(); delete normalList; polygon.verticesList.pop_front(); polygon.normalsList.pop_front(); @@ -884,6 +881,7 @@ void OpenGL3DRenderer::EndAddShapePolygon3DObject() m_Polygon3DInfoList.push_back(m_Polygon3DInfo); m_Polygon3DInfo.normals = NULL; m_Polygon3DInfo.vertices = NULL; + // TODO: moggi: memory leak??? m_Polygon3DInfo.verticesList.clear(); m_Polygon3DInfo.normalsList.clear(); } |