list
// Adding data to the
Iter = TestList.begin();
TestList.insert(new Test(),Iter);
Iter++;
TestList.insert(new Test(),Iter);
Test* pT = NULL;
//Removing All the pointers from the STL list as follows :
while( TestList.size() > 0)
{
Iter = TestList.begin();
pT = *Iter;
TestList.remove(pT); //Remove the item from the list
SAFE_DELETE(pT); //Free the resource
}
No comments:
Post a Comment