summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-08-20 22:26:54 +0200
committerRobin Gareus <robin@gareus.org>2017-08-20 22:26:54 +0200
commit0034f246cb283cea1ad100bfe383ad7801140da9 (patch)
tree01ef8df9e0e1c0ba6aab8d48f0610a5ea0a01fa1
parentf15fc38bd82324e76f69a241179dd0f437fb53dd (diff)
Fix some GUI side XML node mem-leaks
-rw-r--r--gtk2_ardour/processor_box.cc4
-rw-r--r--gtk2_ardour/template_dialog.cc2
2 files changed, 3 insertions, 3 deletions
diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc
index 543a0e2399..f496070537 100644
--- a/gtk2_ardour/processor_box.cc
+++ b/gtk2_ardour/processor_box.cc
@@ -1944,7 +1944,7 @@ ProcessorBox::object_drop (DnDVBox<ProcessorEntry>* source, ProcessorEntry* posi
* otherwise we'll end up with duplicate ports-names.
* (this needs a better solution which retains connections)
*/
- state.remove_nodes ("Processor");
+ state.remove_nodes_and_delete ("Processor");
proc->set_state (state, Stateful::loading_state_version);
boost::dynamic_pointer_cast<PluginInsert>(proc)->update_id (id);
return;
@@ -3307,7 +3307,7 @@ ProcessorBox::paste_processor_state (const XMLNodeList& nlist, boost::shared_ptr
* We really would want Stateful::ForceIDRegeneration here :(
*/
XMLNode state (**niter);
- state.remove_nodes ("Processor");
+ state.remove_nodes_and_delete ("Processor");
p->set_state (state, Stateful::current_state_version);
boost::dynamic_pointer_cast<PluginInsert>(p)->update_id (id);
diff --git a/gtk2_ardour/template_dialog.cc b/gtk2_ardour/template_dialog.cc
index 696cb29dec..27836b4a65 100644
--- a/gtk2_ardour/template_dialog.cc
+++ b/gtk2_ardour/template_dialog.cc
@@ -435,7 +435,7 @@ TemplateManager::save_template_desc ()
return;
}
- tree.root()->remove_nodes (X_("description"));
+ tree.root()->remove_nodes_and_delete (X_("description"));
XMLNode* desc = new XMLNode (X_("description"));
XMLNode* dn = new XMLNode (X_("content"), desc_txt);