diff options
Diffstat (limited to 'src/instrumentparser.cc')
-rw-r--r-- | src/instrumentparser.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/instrumentparser.cc b/src/instrumentparser.cc index b42accd..af876a8 100644 --- a/src/instrumentparser.cc +++ b/src/instrumentparser.cc @@ -144,7 +144,13 @@ void InstrumentParser::startTag(const std::string& name, const attr_t& attr) auto audio_file = std::make_unique<AudioFile>(path + "/" + attr.at("file"), filechannel); - // TODO: This is not deleted anywhere... + // note: memory leak! the channels are never released + // once I replaced this using unique_ptr, the channels were + // destroyed when the InstrumentParser went out of scope + // (see drumkitparser.cc, where the InstrumentParser lives in + // local scope). + // so.. we cannot replace this using smart ptr until we decided + // the ownership semantics for instances InstrumentChannel InstrumentChannel *instrument_channel = new InstrumentChannel(attr.at("channel")); |