SmartPointerList

Maksim Orlovich mo85 at cornell.edu
Thu Jan 14 00:51:19 GMT 2010


> the very first time i used QWeakPointer i gave a small groan about this.
> by
> the end of the day (was converting all the Plasma related code over to
> this
> and some other Qt 4.6 features) I was singing a very different tune. it
> really
> does help, doesn't add to the verbosity of the code in practice (store and
> check the value of data() in a local var) and makes it very easy to spot
> problem code.

That's also a potential flaw: if you store it in local, and it goes away
during that period, you wouldn't get a clean null-pointer crash.







More information about the kde-core-devel mailing list