From fb5fb497b5c81d3adab8e210a4942e34c5bf8e9f Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Mon, 25 Jun 2018 14:33:49 +0200 Subject: Fix some memory leaks --- common/nextpnr.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'common/nextpnr.h') diff --git a/common/nextpnr.h b/common/nextpnr.h index 5b1a6a4f..df9d7e3e 100644 --- a/common/nextpnr.h +++ b/common/nextpnr.h @@ -207,6 +207,18 @@ struct BaseCtx IdString::initialize_add(this, "", 0); IdString::initialize_arch(this); } + + ~BaseCtx() + { + for(auto &item : nets) { + delete item.second; + } + for(auto &item : cells) { + delete item.second; + } + delete idstring_str_to_idx; + delete idstring_idx_to_str; + } }; NEXTPNR_NAMESPACE_END -- cgit v1.2.3