Skip to content
Permalink
Browse files

Fix memory leak in rulebased renderer sip bindings

  • Loading branch information
m-kuhn committed Jan 18, 2016
1 parent 2246dcc commit 352943372968d5de51cc805169d022fc9cbd10c8
@@ -274,7 +274,7 @@ class QgsRuleBasedRendererV2 : QgsFeatureRendererV2
void removeChildAt( int i );

//! take child rule out, set parent as null
void takeChild( QgsRuleBasedRendererV2::Rule* rule );
QgsRuleBasedRendererV2::Rule* takeChild( QgsRuleBasedRendererV2::Rule* rule ) /TransferBack/;

//! take child rule out, set parent as null
QgsRuleBasedRendererV2::Rule* takeChildAt( int i ) /TransferBack/;
@@ -111,11 +111,12 @@ void QgsRuleBasedRendererV2::Rule::removeChildAt( int i )
updateElseRules();
}

void QgsRuleBasedRendererV2::Rule::takeChild( Rule* rule )
QgsRuleBasedRendererV2::Rule* QgsRuleBasedRendererV2::Rule::takeChild( Rule* rule )
{
mChildren.removeAll( rule );
rule->mParent = nullptr;
updateElseRules();
return rule;
}

QgsRuleBasedRendererV2::Rule* QgsRuleBasedRendererV2::Rule::takeChildAt( int i )
@@ -317,7 +317,7 @@ class CORE_EXPORT QgsRuleBasedRendererV2 : public QgsFeatureRendererV2
void removeChildAt( int i );

//! take child rule out, set parent as null
void takeChild( Rule* rule );
Rule* takeChild( Rule* rule );

//! take child rule out, set parent as null
Rule* takeChildAt( int i );

0 comments on commit 3529433

Please sign in to comment.
You can’t perform that action at this time.