Fix some GUI side XML node mem-leaks
authorRobin Gareus <robin@gareus.org>
Sun, 20 Aug 2017 20:26:54 +0000 (22:26 +0200)
committerRobin Gareus <robin@gareus.org>
Sun, 20 Aug 2017 20:26:54 +0000 (22:26 +0200)
gtk2_ardour/processor_box.cc
gtk2_ardour/template_dialog.cc

index 543a0e23993894029918f05d3ea042d94049a05f..f496070537c9023b550c9e095abde7871747ddf0 100644 (file)
@@ -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);
index 696cb29decbb8e45ff3339e06d4eb214a03c71fc..27836b4a658ebc69387bc44ed7a37ceee99c3ece 100644 (file)
@@ -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);