Skip to content

Commit

Permalink
Fix to destructor of utility::CircularBuffer (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
dskyle committed Sep 27, 2018
1 parent bd45e1a commit 82e1507
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion include/madara/utility/CircularBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class CircularBuffer
~CircularBuffer() noexcept
{
clear();
delete data_;
operator delete(data_);
}

/**
Expand Down
4 changes: 4 additions & 0 deletions tests/test_circular_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ void test_circular_int_buffer()
std::cout << *iter << std::endl;
}
std::cout << std::endl;

{
CircularBuffer<KnowledgeRecord> empty(10);
}
}

template<typename T, typename R>
Expand Down

0 comments on commit 82e1507

Please sign in to comment.