[Kde-games-devel] Re: KPoker patch

Albert 'TSDgeos' Astals Cid tsdgeos at terra.es
Sat Jul 12 12:34:20 CEST 2003


At 19:45 11/07/2003 +0200, you wrote:
>On Thursday 10 July 2003 19:11, Albert 'TSDgeos' Astals Cid wrote:
> > That patch solves that bug 59433 http://bugs.kde.org/show_bug.cgi?id=59443
> >
> > Also solves a memory related problem, to see it appear open kpoker and do
> > Ctrl+n (new game) and start a game, repeat it and you'll see kpoker die in
> > three or four attempts, this is due to an erroneus delete[] (found thanks
> > of valgrind) in the player destructor, it was freeing a static [] as many
> > times as objects of that class there were.
> >
> > Also removes some lines of not used code.
> >
> > And finally 'thanks' to kwrite the diff has lots of +/- with the same lines
> > added and removed.
> >
> > The patch comes attached.
>
>Hi
>Concerning the memory problem:
>I think it would be better to replace
>  delete[] cardHelp;
>by
>  delete[] cardHelp;
>  cardHelp = 0;
>--> then you don't need yet another ugly static member.

Didn't know that "delete[] 0;" was a correct sentence, i thought it would 
make a segfault or something like that, of course, your solution is way better.


>I think this line fixes #59443 ?
>+       drawButton->setText(i18n("&Draw"));
>Or did I miss something else?

No it is that line only =)

>Looks good to me. Don't you have a cvs account? Considering the number of
>patches you made lately, I think you could use one...
>If you are fine with the cardHelp change I will commit this patch.

I'll try to get one then 



More information about the kde-games-devel mailing list