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 | |
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')
-rw-r--r-- | libs/midi++2/midi++/midnam_patch.h | 1 | ||||
-rw-r--r-- | libs/midi++2/midnam_patch.cc | 7 |
2 files changed, 4 insertions, 4 deletions
diff --git a/libs/midi++2/midi++/midnam_patch.h b/libs/midi++2/midi++/midnam_patch.h index 9b2a611d9e..4e5bb29f55 100644 --- a/libs/midi++2/midi++/midnam_patch.h +++ b/libs/midi++2/midi++/midnam_patch.h @@ -485,7 +485,6 @@ public: private: std::string _author; MasterDeviceNamesList _master_device_names_list; - XMLTree _document; MasterDeviceNames::Models _all_models; }; 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 |