Suppose I have a following Class:
class foo{
int array_allocation(int length){
array= new int[length];
return 0;
}
private:
int *array;
};
Here should I need to implement ~foo(){ delete []array};
or its implicitly done??