summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--muse2/ChangeLog1
-rw-r--r--muse2/al/sig.cpp6
-rw-r--r--muse2/al/sig.h1
-rw-r--r--muse2/muse/tempo.cpp6
-rw-r--r--muse2/muse/tempo.h1
5 files changed, 15 insertions, 0 deletions
diff --git a/muse2/ChangeLog b/muse2/ChangeLog
index a48daf9a..002b8bf6 100644
--- a/muse2/ChangeLog
+++ b/muse2/ChangeLog
@@ -11,6 +11,7 @@
- song changed not implemented yet
- undo/redo is not implemented
- Fixed crash in dssihost.cpp - my bad from recent p4.0.20 changes. (Tim)
+ - Added destructors to sigmap and tempomap. Test OK. (Tim)
15.04.2011:
- And while we're at it... Invert drum track 'slivers' in arranger parts. (Tim)
- Move part name text to bottom to accommodate drum 'slivers'.
diff --git a/muse2/al/sig.cpp b/muse2/al/sig.cpp
index 7eeae6be..293a5b3e 100644
--- a/muse2/al/sig.cpp
+++ b/muse2/al/sig.cpp
@@ -64,6 +64,12 @@ SigList::SigList()
insert(std::pair<const unsigned, SigEvent*> (MAX_TICK, new SigEvent(TimeSignature(4, 4), 0)));
}
+SigList::~SigList()
+ {
+ for (iSigEvent i = begin(); i != end(); ++i)
+ delete i->second;
+ }
+
//---------------------------------------------------------
// add
// signatures are only allowed at the beginning of
diff --git a/muse2/al/sig.h b/muse2/al/sig.h
index ed18981f..618cd53c 100644
--- a/muse2/al/sig.h
+++ b/muse2/al/sig.h
@@ -85,6 +85,7 @@ class SigList : public SIGLIST {
public:
SigList();
+ ~SigList();
void clear();
void add(unsigned tick, const TimeSignature& s);
//void add(unsigned tick, int z, int n);
diff --git a/muse2/muse/tempo.cpp b/muse2/muse/tempo.cpp
index 418ec031..1e476e45 100644
--- a/muse2/muse/tempo.cpp
+++ b/muse2/muse/tempo.cpp
@@ -30,6 +30,12 @@ TempoList::TempoList()
useList = true;
}
+TempoList::~TempoList()
+ {
+ for (iTEvent i = begin(); i != end(); ++i)
+ delete i->second;
+ }
+
//---------------------------------------------------------
// add
//---------------------------------------------------------
diff --git a/muse2/muse/tempo.h b/muse2/muse/tempo.h
index 61ec50f5..632d60bb 100644
--- a/muse2/muse/tempo.h
+++ b/muse2/muse/tempo.h
@@ -61,6 +61,7 @@ class TempoList : public TEMPOLIST {
public:
TempoList();
+ ~TempoList();
void clear();
void read(Xml&);