From a67f18f8ef5a30167984dc4e5735c7d20ed0d176 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 27 Aug 2014 17:29:22 +0200 Subject: [PATCH] ivl: Do not delete range objects right after setting range for a net. --- PScope.cc | 3 +++ main.cc | 6 ++++++ pform.cc | 1 - 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/PScope.cc b/PScope.cc index 9fb4cef55..377142bf9 100644 --- a/PScope.cc +++ b/PScope.cc @@ -31,6 +31,9 @@ PScope::PScope(perm_string n) PScope::~PScope() { + for(map::iterator it = typedefs.begin(); + it != typedefs.end(); ++it) + delete it->second; } PWire* LexicalScope::wires_find(perm_string name) diff --git a/main.cc b/main.cc index 5c7e040a1..3658ba512 100644 --- a/main.cc +++ b/main.cc @@ -1142,6 +1142,12 @@ int main(int argc, char*argv[]) (*idx).second = 0; } + for(map::iterator it = pform_typedefs.begin() + ; it != pform_typedefs.end() ; ++it) { + delete (*it).second; + (*it).second = 0; + } + if (verbose_flag) { if (times_flag) { times(cycles+2); diff --git a/pform.cc b/pform.cc index 7c58fa343..68e9a072d 100644 --- a/pform.cc +++ b/pform.cc @@ -1885,7 +1885,6 @@ static void pform_set_net_range(list*names, } delete names; - delete range; } /*