I created a STXXL priority queue in my program. If I do not need the PQ any more, how to delete it? Just like delete[] buffer in C++. I want to free the memory used by it.
I looked through their examples and description, but I cannot find the way. Once a PQ is created, will the memory be occupied by this PQ until the end of the program?
For example, if I define two priority queues: Q1 and Q2.
typedef stxxl::PRIORITY_QUEUE_GENERATOR <
SufNode<unsigned char>,
ComparatorGreater<unsigned char>,
mem*1024*1024, 1024*1024
>::result pqueue_type0;
pqueue_type0 Q1(pool1);
Then I do something with Q1, then delete it, so I can allocate more memory for Q2.
typedef stxxl::PRIORITY_QUEUE_GENERATOR<
SufNode<unsigned char>,
ComparatorGreater2<unsigned char>,
mem*1024*1024, 1024*1024
>::result pqueue_type20;
pqueue_type20 Q2(pool2);