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:
parent
cb320925b9
commit
6efa3215a2
@ -63,6 +63,7 @@ QOpenGLCustomShaderStage::~QOpenGLCustomShaderStage()
|
|||||||
d->m_manager->removeCustomStage();
|
d->m_manager->removeCustomStage();
|
||||||
d->m_manager->sharedShaders->cleanupCustomStage(this);
|
d->m_manager->sharedShaders->cleanupCustomStage(this);
|
||||||
}
|
}
|
||||||
|
delete d_ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QOpenGLCustomShaderStage::setUniformsDirty()
|
void QOpenGLCustomShaderStage::setUniformsDirty()
|
||||||
|
@ -46,6 +46,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#include <QOpenGLShaderProgram>
|
#include <QOpenGLShaderProgram>
|
||||||
|
#include <QtGlobal>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
@ -72,6 +73,8 @@ protected:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
QOpenGLCustomShaderStagePrivate* d_ptr;
|
QOpenGLCustomShaderStagePrivate* d_ptr;
|
||||||
|
|
||||||
|
Q_DISABLE_COPY(QOpenGLCustomShaderStage)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user