C++ deleting a pointer to a pointer

前端 未结 7 583
猫巷女王i
猫巷女王i 2020-12-24 14:41

So I have a pointer to an array of pointers. If I delete it like this:

delete [] PointerToPointers;

Will that delete all the pointed to po

7条回答
  •  猫巷女王i
    2020-12-24 15:27

    See boost pointer container for a container that does the automatic deletion of contained pointers for you, while maintaining a syntax very close to ordinary STL containers.

提交回复
热议问题