Where to delete an object created by factory?

后端 未结 4 929
萌比男神i
萌比男神i 2021-02-19 04:01

If I have a factory, that creates an object and returns a pointer to it, what will be a better way to delete it:

By delete call in the \"user\" code, or by

4条回答
提交回复
热议问题