Skip to content

Commit

Permalink
Merge pull request ethz-asl#277 from ethz-asl/fix/sorted_integration_…
Browse files Browse the repository at this point in the history
…memory_leak

Fix memory leak observed by ARL
  • Loading branch information
victorreijgwart authored Jul 1, 2019
2 parents f8a1dae + a40b7ef commit 9de0d2b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions voxblox/include/voxblox/integrator/integrator_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ class ThreadSafeIndex {
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW

// NOTE: The ThreadSafeIndex base destructor must be marked virtual.
// Otherwise the destructors of derived classes don't get called when
// derived class instances are destructed through base class pointers.
// This would result leaking memory due to derived class member
// variables not being freed.
virtual ~ThreadSafeIndex() = default;

/// returns true if index is valid, false otherwise
bool getNextIndex(size_t* idx);

Expand Down

0 comments on commit 9de0d2b

Please sign in to comment.