Let's suppose I've to create a class with this structure
class A
{
int a;
B* b;
}
I read that it's a good thing deallocate the variable used in the deconstructor.
~A
{
delete b;
}
but how I have to do for a variable of type int, double, primitive type in general? What's the best way or a good programming rule?