Re: Pointers in C++
Hello,
I agree with visualstudio, use smartpointers, this pointers will delete the conten or the pointed-object when you are outsite the block. This is recommented, because when a exception is thrown, it clean automaticly up the pointers. Also the smartpointers throw a exception when you try to access on a nullptr.
Btw. use nullptr, not NULL. Because Null is defined as follows:
#define NULL 0
This macro can cause problems, when you have overloaded functions or something else.
Use google to read more about smartpointers and which do you should use.
best regards,
Christopher
_______________________________________________ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector