Skip to content

Commit

Permalink
Fix another memory leak.
Browse files Browse the repository at this point in the history
  • Loading branch information
luciansmith committed Sep 12, 2024
1 parent 51ba934 commit da5519c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,18 @@ Module& Module::operator=(const Module& src)

Module::~Module()
{
for (size_t l = 0; l < m_defaultLayouts.size(); l++) {
delete m_defaultLayouts[l];
}
for (size_t l = 0; l < m_compartmentLayouts.size(); l++) {
delete m_compartmentLayouts[l];
}
for (size_t l = 0; l < m_speciesLayouts.size(); l++) {
delete m_speciesLayouts[l];
}
for (size_t l = 0; l < m_reactionLayouts.size(); l++) {
delete m_reactionLayouts[l];
}
}

Variable* Module::AddOrFindVariable(const string* name)
Expand Down

0 comments on commit da5519c

Please sign in to comment.