7 Sep
2017
7 Sep
'17
1:54 p.m.
Den 07-09-2017 kl. 11:09 skrev Florian Lindner via Boost-users:
Hello,
in my project we have a simple ptr_vector that has a member function:
void deleteElements () { for ( CONTENT_T * elem : _content ) { assertion ( elem != NULL ); delete ( elem ); } }
I want to replace this ptr_vector with boost::ptr_vector. However, I haven't found a way to delete and free all pointers stored in the container. How can I do that?
Note also that the destructor automatically cleans up. -T