18 Jan
2007
18 Jan
'07
4:58 p.m.
sadrok wrote:
Hi,
I'm loading a class that requires a reference passed to the constructor. The implementation requires loading data into a pointer as explained in the docs. How is the memory for the loaded object handled? Does it automatically get freed when the object goes out of scope?
Nope, you have to manage it yourself. Look for delete_created pointers in the docs. Also, consider using shared_ptr for automatic storage managment. Serialization for shared_ptr is included with the library.
Thanks