[Kde-games-devel] Re: KPoker patch

Andreas Beckermann b_mann at gmx.de
Fri Jul 11 20:45:02 CEST 2003


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.

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

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.

CU
Andi


More information about the kde-games-devel mailing list