Return an array with all the values of the set
| 473 | |
| 474 | /// Return an array with all the values of the set |
| 475 | Array<V> toArray(MemoryAllocator& arrayAllocator) const { |
| 476 | |
| 477 | Array<V> array(arrayAllocator, size()); |
| 478 | |
| 479 | for (auto it = begin(); it != end(); ++it) { |
| 480 | array.add(*it); |
| 481 | } |
| 482 | |
| 483 | return array; |
| 484 | } |
| 485 | |
| 486 | /// Clear the set |
| 487 | void clear(bool releaseMemory = false) { |