I'm writing a module in SystemC where within the constructor I have a variable initialized with new
:
SC_CTOR(MY_MODULE)
{
...
...
my_matrix = new unsigned char [a*b];
...
...
}
How can I declare the destructor to release the memory when the simulation ends?