protocol buffer中通过add()相关方法,产生一个repeated属性的对象,然后把这个对象的指针放到STL容器中。 释放容器时,是需要先delete对象指针再clear容器,还是直接clear容器?
ringa_lee
I suggest you learn Chinese carefully
Delete the object first. Directly clearing the container will cause memory leaks.
I suggest you learn Chinese carefully
Delete the object first. Directly clearing the container will cause memory leaks.