diff options
author | Robin Gareus <robin@gareus.org> | 2014-09-09 23:53:27 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2014-09-09 23:53:27 +0200 |
commit | a361781e084c552518a3a90277a1455071aa0774 (patch) | |
tree | 32dfb2e335d4b393551d56c3a90686a9a93d704f /libs/midi++2/midnam_patch.cc | |
parent | 19a57a2809a2b8befd17875a0780c6880b6a9501 (diff) |
plug a major mem hog.
(default empty session is now ~140MB RSS, was 280MB)
libXML memory was only free() at exit
Diffstat (limited to 'libs/midi++2/midnam_patch.cc')
-rw-r--r-- | libs/midi++2/midnam_patch.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libs/midi++2/midnam_patch.cc b/libs/midi++2/midnam_patch.cc index 1ec6062205..bf841e9a68 100644 --- a/libs/midi++2/midnam_patch.cc +++ b/libs/midi++2/midnam_patch.cc @@ -877,12 +877,13 @@ MasterDeviceNames::get_state(void) MIDINameDocument::MIDINameDocument (const string& filename) { - if (!_document.read (filename)) { + XMLTree document; + if (!document.read (filename)) { throw failed_constructor (); } - _document.set_filename (filename); - set_state (_document, *_document.root()); + document.set_filename (filename); + set_state (document, *document.root()); } int |