aboutsummaryrefslogtreecommitdiff
path: root/qtmips_gui
diff options
context:
space:
mode:
Diffstat (limited to 'qtmips_gui')
-rw-r--r--qtmips_gui/cacheview.cpp9
-rw-r--r--qtmips_gui/memoryview.cpp1
2 files changed, 6 insertions, 4 deletions
diff --git a/qtmips_gui/cacheview.cpp b/qtmips_gui/cacheview.cpp
index 24b8d7b..d279083 100644
--- a/qtmips_gui/cacheview.cpp
+++ b/qtmips_gui/cacheview.cpp
@@ -210,11 +210,12 @@ CacheViewBlock::CacheViewBlock(const machine::Cache *cache, unsigned block , boo
}
CacheViewBlock::~CacheViewBlock() {
- delete validity;
- delete dirty;
- delete tag;
+ delete[] validity;
+ if (dirty != nullptr)
+ delete[] dirty;
+ delete[] tag;
for (unsigned y = 0; y < rows; y++)
- delete data[y];
+ delete[] data[y];
delete data;
}
diff --git a/qtmips_gui/memoryview.cpp b/qtmips_gui/memoryview.cpp
index 9bc0b0c..0457633 100644
--- a/qtmips_gui/memoryview.cpp
+++ b/qtmips_gui/memoryview.cpp
@@ -47,6 +47,7 @@
MemoryView::MemoryView(QWidget *parent, std::uint32_t addr0) : QWidget(parent) {
memory = nullptr;
addr_0 = addr0;
+ change_counter = 0;
layout = new QVBoxLayout(this);