Skip to content

Commit

Permalink
Fix order of deinitialization
Browse files Browse the repository at this point in the history
  • Loading branch information
giacomofiorin committed Feb 20, 2024
1 parent 644cbee commit 14dbb58
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/colvarmodule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1305,14 +1305,15 @@ colvarmodule::~colvarmodule()

reset();

// Clear the global map first, after which each colvar takes down its own CVCs
colvar_components_.clear();

// Delete contents of static arrays
colvarbias::delete_features();
colvar::delete_features();
colvar::cvc::delete_features();
atom_group::delete_features();

colvar_components_.clear();

// The proxy object will be deallocated last (if at all)
proxy = nullptr;
}
Expand Down

0 comments on commit 14dbb58

Please sign in to comment.