[Qt-interest] correct usage of qt smart pointers ?
jjDaNiMoTh
jjdanimoth at gmail.com
Mon May 9 15:51:57 CEST 2011
2011/5/9 Matthias Pospiech <matthias.pospiech at gmx.de>:
> I want to store derived classes pointer in a base class vector.
> The saved pointer shall be accesible, but not deletable from outside
When I was searching a thing (which was likely to yours) I
encountered, on the Parashift's c++ faq, the following statement:
"And nothing in C++ "prevents" people from doing the wrong thing" [1]
Consider only to write a comment, like "Never delete" or "I will
delete this in the future, don't care about that".
[1] http://www.parashift.com/c++-faq-lite/strange-inheritance.html#faq-23.12
More information about the Qt-interest-old
mailing list