Commit c552ca42 by Christian Kern

Fix bug 382

parent 3c5892ee
......@@ -34,8 +34,9 @@ template< typename ElementT >
FixedSizeList<ElementT>::FixedSizeList(size_t max_size) :
max_size(max_size),
size(0) {
elementsArray =
new ElementT[max_size];
elementsArray = static_cast<ElementT*>(
embb::base::Allocation::Allocate(sizeof(ElementT) *
max_size));
}
template< typename ElementT >
......@@ -92,7 +93,7 @@ bool FixedSizeList<ElementT>::PushBack(ElementT const el) {
template< typename ElementT >
FixedSizeList<ElementT>::~FixedSizeList() {
delete[] elementsArray;
embb::base::Allocation::Free(elementsArray);
}
template< typename GuardType >
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment