[patch] to bug 88243

Paul Temple paul.temple at gmx.net
Thu Feb 10 23:16:35 GMT 2005


> Looks to me you take an adress of a temporary with
>   Node* myNode = &(toNode(args[0]));
> that should be written as
>   Node myNode = toNode(args[0]);
> which also looks a lot less scary :-)

Yes, there are warnings, but _I_ (unlike the compiler) know that 
I don't do any harm... :)

I wrote that with my little c++ knowledge... I thought that
"Node myNode" would allocate memory which was not necessary as 
this is done in "toNode(..)" anyway.

Why does 
>   Node myNode = toNode(args[0]);
look scary? Does it allocate never used memory or not?




More information about the kfm-devel mailing list