jeudi 29 janvier 2015

boost ptr vector correct way to erase one element


Vote count:

0




I have a list called mesh_list;which is a boost::ptr_vector mesh_list; now I want to delete one element from it. inside of mesh object it has 1 pointer which I newed from constructor,they are:


texture* tex;


now it is a normal pointer, Do I have to delete it before erase the mesh element from list? what if I change the texture pointer to shared_ptr,what advantage will I get? thanks



asked 35 secs ago







boost ptr vector correct way to erase one element

Aucun commentaire:

Enregistrer un commentaire