Skip to content

Commit

Permalink
Remove profileset options after processing
Browse files Browse the repository at this point in the history
  • Loading branch information
navv1234 committed Jan 19, 2018
1 parent c1eb286 commit 754fbf6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions engine/sim/sc_profileset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,12 @@ sim_control_t* profile_set_t::options() const
return m_options;
}

void profile_set_t::cleanup_options()
{
delete m_options;
m_options = nullptr;
}

profile_set_t::~profile_set_t()
{
delete m_options;
Expand Down Expand Up @@ -443,6 +449,8 @@ bool profilesets_t::iterate( sim_t* parent )
} );
}

set -> cleanup_options();

delete profile_sim;
}

Expand Down
2 changes: 2 additions & 0 deletions engine/sim/sc_profileset.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ class profile_set_t

~profile_set_t();

void cleanup_options();

const std::string& name() const
{ return m_name; }

Expand Down

0 comments on commit 754fbf6

Please sign in to comment.