If I have a function that has a variable declared inside it (which is a pointer) that can be set equal to a pointer returned from another function, do i need to delete it before returning from the function?
Code:void test() { Test* t = obj.getTest(); ...elided... //do this? (assuming others need to use what's in get() ) delete t; t = NULL; }