diff --git a/python/core/auto_generated/classification/qgsclassificationmethodregistry.sip.in b/python/core/auto_generated/classification/qgsclassificationmethodregistry.sip.in index 232979d9b5c..07813384e62 100644 --- a/python/core/auto_generated/classification/qgsclassificationmethodregistry.sip.in +++ b/python/core/auto_generated/classification/qgsclassificationmethodregistry.sip.in @@ -28,6 +28,7 @@ QgsClassificationMethodRegistry is not usually directly created, but rather acce %End public: QgsClassificationMethodRegistry(); + ~QgsClassificationMethodRegistry(); bool addMethod( QgsClassificationMethod *method /Transfer/ ); %Docstring diff --git a/src/core/classification/qgsclassificationmethodregistry.cpp b/src/core/classification/qgsclassificationmethodregistry.cpp index 1f619a4ecb5..a381971e41e 100644 --- a/src/core/classification/qgsclassificationmethodregistry.cpp +++ b/src/core/classification/qgsclassificationmethodregistry.cpp @@ -36,6 +36,11 @@ QgsClassificationMethodRegistry::QgsClassificationMethodRegistry() addMethod( new QgsClassificationLogarithmic() ); } +QgsClassificationMethodRegistry::~QgsClassificationMethodRegistry() +{ + qDeleteAll( mMethods ); +} + bool QgsClassificationMethodRegistry::addMethod( QgsClassificationMethod *method ) { if ( mMethods.contains( method->id() ) ) diff --git a/src/core/classification/qgsclassificationmethodregistry.h b/src/core/classification/qgsclassificationmethodregistry.h index 6dee67fcdd6..38478916f1e 100644 --- a/src/core/classification/qgsclassificationmethodregistry.h +++ b/src/core/classification/qgsclassificationmethodregistry.h @@ -39,6 +39,7 @@ class CORE_EXPORT QgsClassificationMethodRegistry { public: QgsClassificationMethodRegistry(); + ~QgsClassificationMethodRegistry(); /** * Adds a method to the registry