mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-17 00:04:02 -04:00
Fix memory leak
This commit is contained in:
parent
f69d7f8f83
commit
5be319157f
@ -28,6 +28,7 @@ QgsClassificationMethodRegistry is not usually directly created, but rather acce
|
|||||||
%End
|
%End
|
||||||
public:
|
public:
|
||||||
QgsClassificationMethodRegistry();
|
QgsClassificationMethodRegistry();
|
||||||
|
~QgsClassificationMethodRegistry();
|
||||||
|
|
||||||
bool addMethod( QgsClassificationMethod *method /Transfer/ );
|
bool addMethod( QgsClassificationMethod *method /Transfer/ );
|
||||||
%Docstring
|
%Docstring
|
||||||
|
@ -36,6 +36,11 @@ QgsClassificationMethodRegistry::QgsClassificationMethodRegistry()
|
|||||||
addMethod( new QgsClassificationLogarithmic() );
|
addMethod( new QgsClassificationLogarithmic() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QgsClassificationMethodRegistry::~QgsClassificationMethodRegistry()
|
||||||
|
{
|
||||||
|
qDeleteAll( mMethods );
|
||||||
|
}
|
||||||
|
|
||||||
bool QgsClassificationMethodRegistry::addMethod( QgsClassificationMethod *method )
|
bool QgsClassificationMethodRegistry::addMethod( QgsClassificationMethod *method )
|
||||||
{
|
{
|
||||||
if ( mMethods.contains( method->id() ) )
|
if ( mMethods.contains( method->id() ) )
|
||||||
|
@ -39,6 +39,7 @@ class CORE_EXPORT QgsClassificationMethodRegistry
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QgsClassificationMethodRegistry();
|
QgsClassificationMethodRegistry();
|
||||||
|
~QgsClassificationMethodRegistry();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a method to the registry
|
* Adds a method to the registry
|
||||||
|
Loading…
x
Reference in New Issue
Block a user