Added destructor to HeapMaxPriorityQueue

This commit is contained in:
Gianpaolo Palma 2014-06-20 13:55:19 +00:00
parent f5778fd180
commit f97ccfbf56
1 changed files with 7 additions and 0 deletions

View File

@ -43,6 +43,13 @@ public:
mMaxSize = 0;
}
~HeapMaxPriorityQueue()
{
if (mElements)
delete[] mElements;
}
inline void setMaxSize(int maxSize)
{
if (mMaxSize!=maxSize)