mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -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
|
||||
public:
|
||||
QgsClassificationMethodRegistry();
|
||||
~QgsClassificationMethodRegistry();
|
||||
|
||||
bool addMethod( QgsClassificationMethod *method /Transfer/ );
|
||||
%Docstring
|
||||
|
@ -36,6 +36,11 @@ QgsClassificationMethodRegistry::QgsClassificationMethodRegistry()
|
||||
addMethod( new QgsClassificationLogarithmic() );
|
||||
}
|
||||
|
||||
QgsClassificationMethodRegistry::~QgsClassificationMethodRegistry()
|
||||
{
|
||||
qDeleteAll( mMethods );
|
||||
}
|
||||
|
||||
bool QgsClassificationMethodRegistry::addMethod( QgsClassificationMethod *method )
|
||||
{
|
||||
if ( mMethods.contains( method->id() ) )
|
||||
|
@ -39,6 +39,7 @@ class CORE_EXPORT QgsClassificationMethodRegistry
|
||||
{
|
||||
public:
|
||||
QgsClassificationMethodRegistry();
|
||||
~QgsClassificationMethodRegistry();
|
||||
|
||||
/**
|
||||
* Adds a method to the registry
|
||||
|
Loading…
x
Reference in New Issue
Block a user