As T3 shares some resources with two T2 planners `p_root_` and `p_goal_`
the problem with descructors occures.
Therefore, all the code needed for destructing T3 planner and both T2
planners (`p_root_` and `p_goal_`) is in T3 destructor method
(`T3::~T3()`) and T2 destructor (and its parent destructors) must not be
called.
If only T2 planner should be used, this patch has to be *reverted*.
- Refactor `gplot` module.
- T2 planner to include variable steer step size.
- Refactor `gplot` module.
- T2 planner to include variable steer step size.
+### Removed
+- RRTBase planner destructor. See `base/rrtbase.cc` for more info.
+
## 0.3.0 - 2018-12-03
### Added
- Cost distribution plot function.
## 0.3.0 - 2018-12-03
### Added
- Cost distribution plot function.
- for (auto n: this->nodes_)
- if (n != this->root_)
- delete n;
- for (auto n: this->dnodes_)
- if (n != this->root_ && n != this->goal_)
- delete n;
- for (auto s: this->samples_)
- if (s != this->goal_)
- delete s;
- for (auto edges: this->rlog_)
- for (auto e: edges)
- delete e;
- delete this->root_;
- delete this->goal_;
+// Fix heap-use-after-free error when T3 planner is used. If only T2 is used,
+// please uncommend the following code:
+//
+// for (auto n: this->nodes_)
+// if (n != this->root_)
+// delete n;
+// for (auto n: this->dnodes_)
+// if (n != this->root_ && n != this->goal_)
+// delete n;
+// for (auto s: this->samples_)
+// if (s != this->goal_)
+// delete s;
+// for (auto edges: this->rlog_)
+// for (auto e: edges)
+// delete e;
+// delete this->root_;
+// delete this->goal_;