a pointer class!

Started by
3 comments, last by Dark Metamorphosis 19 years, 6 months ago
hi, I just wanted to know your opinion about this, I thought of making a templated pointer class for my new engine, this class would allow me to control the errors that a pointer usually create (out of bounds, null pointer...), and also would allow me save every thing automaticaly (for instance saving an octree, that have pointers to other childs...). so what do you thing?
K'-P = ME
Advertisement
A GOOD idea to use this.
The concept is called smart pointer.

But don't reinvent the wheel, google for auto_ptr (C++ std lib), scoped_ptr & shared_ptr (boost).

Thermo
Quote:automatically


sounds too good to be true.
I think its possible if he puts the serialization logic into the destructor.

Thermo
well, I'll google that.
and thanks for sharing your thoughts.
K'-P = ME

This topic is closed to new replies.

Advertisement