summaryrefslogtreecommitdiff
path: root/libs/pbd/xml++.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-10-20 18:44:44 +0000
committerCarl Hetherington <carl@carlh.net>2009-10-20 18:44:44 +0000
commit271f298635567b7aef922316e14b910fda0c508e (patch)
tree1536d67a6f4ee253043c110651e1680a8d641908 /libs/pbd/xml++.cc
parent2898c4fa70805135a59739646fb476359e2e3fef (diff)
Since add_property creates new XMLProperty objects, remove_property should probably delete them. Although remove_property is only used in one place in Ardour that I can see.
git-svn-id: svn://localhost/ardour2/branches/3.0@5824 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/pbd/xml++.cc')
-rw-r--r--libs/pbd/xml++.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/pbd/xml++.cc b/libs/pbd/xml++.cc
index eb48c8e346..90d7c3cf48 100644
--- a/libs/pbd/xml++.cc
+++ b/libs/pbd/xml++.cc
@@ -413,7 +413,9 @@ void
XMLNode::remove_property(const string& n)
{
if (_propmap.find(n) != _propmap.end()) {
- _proplist.remove(_propmap[n]);
+ XMLProperty* p = _propmap[n];
+ _proplist.remove (p);
+ delete p;
_propmap.erase(n);
}
}