QOpenGLCustomShaderStage - fix a memory leak

Coverity found a memory leak - CID-10995. Fix a dtor + make copy constructor
/ assignment operator private (Q_DISABLE_COPY).

Change-Id: I4f046d075b60fbfb69f350e4a4d8b07ea1643914
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
This commit is contained in:
Timur Pocheptsov 2016-04-15 16:51:04 +02:00
parent cb320925b9
commit 6efa3215a2
2 changed files with 4 additions and 0 deletions

View File

@ -63,6 +63,7 @@ QOpenGLCustomShaderStage::~QOpenGLCustomShaderStage()
d->m_manager->removeCustomStage();
d->m_manager->sharedShaders->cleanupCustomStage(this);
}
delete d_ptr;
}
void QOpenGLCustomShaderStage::setUniformsDirty()

View File

@ -46,6 +46,7 @@
//
#include <QOpenGLShaderProgram>
#include <QtGlobal>
QT_BEGIN_NAMESPACE
@ -72,6 +73,8 @@ protected:
private:
QOpenGLCustomShaderStagePrivate* d_ptr;
Q_DISABLE_COPY(QOpenGLCustomShaderStage)
};