|
Boost Users : |
Subject: [Boost-users] Delete and free all elements of ptr_vector
From: Florian Lindner (mailinglists_at_[hidden])
Date: 2017-09-07 09:09:54
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?
Thanks,
Florian
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net