Commit c552ca42 by Christian Kern

Fix bug 382

parent 3c5892ee
...@@ -34,8 +34,9 @@ template< typename ElementT > ...@@ -34,8 +34,9 @@ template< typename ElementT >
FixedSizeList<ElementT>::FixedSizeList(size_t max_size) : FixedSizeList<ElementT>::FixedSizeList(size_t max_size) :
max_size(max_size), max_size(max_size),
size(0) { size(0) {
elementsArray = elementsArray = static_cast<ElementT*>(
new ElementT[max_size]; embb::base::Allocation::Allocate(sizeof(ElementT) *
max_size));
} }
template< typename ElementT > template< typename ElementT >
...@@ -92,7 +93,7 @@ bool FixedSizeList<ElementT>::PushBack(ElementT const el) { ...@@ -92,7 +93,7 @@ bool FixedSizeList<ElementT>::PushBack(ElementT const el) {
template< typename ElementT > template< typename ElementT >
FixedSizeList<ElementT>::~FixedSizeList() { FixedSizeList<ElementT>::~FixedSizeList() {
delete[] elementsArray; embb::base::Allocation::Free(elementsArray);
} }
template< typename GuardType > 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