diff options
Diffstat (limited to 'src/datavisualizationqml2/glstatestore.cpp')
-rw-r--r-- | src/datavisualizationqml2/glstatestore.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/datavisualizationqml2/glstatestore.cpp b/src/datavisualizationqml2/glstatestore.cpp index f053078b..6fbd3a34 100644 --- a/src/datavisualizationqml2/glstatestore.cpp +++ b/src/datavisualizationqml2/glstatestore.cpp @@ -50,13 +50,13 @@ GLStateStore::GLStateStore(QOpenGLContext *context, QObject *parent) : #endif m_maxVertexAttribs = qMin(maxVertexAttribs, 2); // Datavis only uses 2 attribs max - m_vertexAttribArrayEnabledStates = new GLint[maxVertexAttribs]; - m_vertexAttribArrayBoundBuffers = new GLint[maxVertexAttribs]; - m_vertexAttribArraySizes = new GLint[maxVertexAttribs]; - m_vertexAttribArrayTypes = new GLint[maxVertexAttribs]; - m_vertexAttribArrayNormalized = new GLint[maxVertexAttribs]; - m_vertexAttribArrayStrides = new GLint[maxVertexAttribs]; - m_vertexAttribArrayOffsets = new GLint[maxVertexAttribs]; + m_vertexAttribArrayEnabledStates.reset(new GLint[maxVertexAttribs]); + m_vertexAttribArrayBoundBuffers.reset(new GLint[maxVertexAttribs]); + m_vertexAttribArraySizes.reset(new GLint[maxVertexAttribs]); + m_vertexAttribArrayTypes.reset(new GLint[maxVertexAttribs]); + m_vertexAttribArrayNormalized.reset(new GLint[maxVertexAttribs]); + m_vertexAttribArrayStrides.reset(new GLint[maxVertexAttribs]); + m_vertexAttribArrayOffsets.reset(new GLint[maxVertexAttribs]); initGLDefaultState(); } @@ -67,8 +67,6 @@ GLStateStore::~GLStateStore() EnumToStringMap::deleteInstance(); m_map = 0; #endif - delete m_vertexAttribArrayEnabledStates; - delete m_vertexAttribArrayBoundBuffers; } void GLStateStore::storeGLState() |