1
0
mirror of https://github.com/YosysHQ/nextpnr.git synced 2026-05-02 22:32:35 +00:00

Fix some memory leaks

This commit is contained in:
Miodrag Milanovic
2018-06-25 14:33:49 +02:00
parent fd8017449d
commit fb5fb497b5
2 changed files with 12 additions and 1 deletions

View File

@@ -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