Hi
simple question in c++ , say i have a loop and i have function that returns pointer to item
so i have to define inner loop pointer so my question is what to do with the pointer inside the loop , delete it ? or to set it with new value is good
for example:
for(int i =0;i<count();i++)
{
ptrTmp* ptr = getItemPtr();
// do somthing with the ptr ...
// what to do here ? to delete the poinetr or not?
delete ptr; // ??
}