I have a question. Consider this template class
template<class T>
class nodo{
public:
T data;
};
Let's suppose that I'm not redefining the destructor. If we suppose that T=int, the standard destructor deallocates data. But what happens if T=int* ? Is just the pointer going to be deallocated or the object pointed too? In theory just the pointer.
How can I deallocate the object pointed to? In the end, how can I write the destructor of a template class that has a template parameter that could be a pointer (and so of an explicit deallocation)?