[patch] resource leakage in KJS

Germain Garand germain at ebooksfrance.org
Thu Mar 9 08:47:25 GMT 2006


Le Jeudi 09 Mars 2006 07:25, Harri Porten a écrit :
> yOn Wed, 8 Mar 2006, Germain Garand wrote:
> > When inline statements are repeteadly evaluated the effect rapidly
> > becomes quite bad - and IIUC the pollution seems process wide.
> >
> > So does attached patch looks OK or should that be fixed elsewhere?
>
> Looks good. But could be simplified to use
>
>   if (ai->interp == interp)
>       return;
>
> instead of break'ing first, no?

sure, I wrote it so because some people dislike return statements in the 
middle of flow, but if you don't care I definetly don't.

BTW, I had a quick look at the new JSCore way, and it doesn't look immune to 
that problem either... but as its not iterating anymore, I don't know what's 
the best way to fix it. I'd say: iterating again ;(

Germain




More information about the kfm-devel mailing list