A New Krazy Checker for Methods Returning const refs

Jos van den Oever jvdoever at gmail.com
Sun Apr 15 12:46:02 BST 2007


2007/4/15, Thomas Zander <zander at kde.org>:
> Which means that he was pointing at an internal member of my class for the
> whole lifetime of his class.
>
> And thats just bad design. Its bound to crash weirdly sooner or later.
Yes, that's bad design but not on the part of your class.
If every class is forced to only give out threadsave implicitly shared
objects, you might as well use java. It means that using any STL class
is out of the question unless it is wrapped. That's a silly overhead.
What's next? Disallowing pointers as return types?

Cheers,
Jos




More information about the kde-core-devel mailing list