[Uml-devel] dynamic_cast usage

Jonathan Riddell jr at jriddell.org
Wed Dec 18 13:54:02 UTC 2002

> I found many dynamic_casts in umbrello, while most of them should be
> static_casts, I think.

Ah, so that's the difference.  Why can't the books make it that clear.

> Another thing I just noticed: deleting a 0L-pointer is perfectly valid, i.e.
> there is no need check for non-0L before deleting something, like
> if ( foo )
> 	delete foo;

Of course you have to make sure that foo really is null first and not
completely uninitialised!

Jonathan Riddell

More information about the umbrello-devel mailing list