(de)allocation of memory for the compiled object is done with virtual functions, so that derived class can overload them.