I want to understand something about dynamic memory: new and delete for a class template as below.
I have class template defined by some library(in house developed) which defines the class template as below.
template <class DAT, class IDX, int ENTRYMX=0x20, int SUBMX=34, int bsz=8>
class HashTable : public public HashTableIn
{
HashTable ()
: HashTableIn(ENTRYMX),
...
...
...
}
In my code I use an object of that template class as:
mpRt = new HashTable<data_st,index_st>;
and I delete this mpRt explicitly as( I know smart pointers... but currently they arent used in this legacy code so lets leave them out)
delete mpRt;
My question: I am trying to understand whether Do i have to do
delete [] mpRt
because the class template has a default argument of ENTRYMX = 0x20