list dog; ............. ............
So I added many dog objects to it.
If I call dog.pop_front();
Does memory automatically gets deallocated ? For the object that I popped out ?
So If I call
list<Dog*> dog2;
dog2.push_back(dog.front());
and then I will call dog.pop_front()
So this will work? I will assume Dog as type struct.