Skip to content

Commit

Permalink
Fix destruction order of some member variables
Browse files Browse the repository at this point in the history
Signed-off-by: Addisu Z. Taddese <[email protected]>
  • Loading branch information
azeey committed Sep 19, 2023
1 parent 0a417ca commit 8f064db
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bullet-featherstone/src/Base.hh
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,11 @@ class Base : public Implements3d<FeatureList<Feature>>
}

public: ~Base() override {
this->triangleMeshes.clear();
// The order of destruction between meshesGImpact and triangleMeshes is
// important.
this->meshesGImpact.clear();
this->triangleMeshes.clear();

this->joints.clear();

for (auto [k, link] : links)
Expand Down

0 comments on commit 8f064db

Please sign in to comment.