checking if T value is pointer then delete pointer, otherwise skip this line in fact the data is not on the heap but on stack created without new keyword
but it won't even compile throwing error
error: type 'class Student' argument given to 'delete', expected pointer|
but I tried to check if is it a pointer inside method
how can i create method which can delete T if it's pointer but otherwise skip it?