bug-gnubg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnubg] Tutor mode patches for gnubg


From: Joern Thyssen
Subject: Re: [Bug-gnubg] Tutor mode patches for gnubg
Date: Sat, 27 Jul 2002 09:11:29 +0000
User-agent: Mutt/1.2.5.1i

On Fri, Jul 26, 2002 at 05:11:36PM +0200, Jim Segrave wrote
> This is a rather lengthy analysis of the problem which I attempted to
> patch in gtkgame.c DestroyHint(). 
[snip]
> I don't claim to be too au fait with the internals of gtk, but it was
> my impression that setting up a reference should preserve the
> data. GTKHint() does do a gtk_object_weakref on pwHint. The html
> reference manual suggests that this probably isn't strong enough and
> this should be a gtk_object_ref instead. If I understand the docs, the
> weakref is enough to get DestroyHint called, but does not ensure that
> the data associated with pwHint will still be valid.
> 
> But I'd like someone with a better knowledge of gtk to offer an
> opinion on this one. 
> 
> What I am sure of is that DestroyHint may well be called and receive a
> pointer to the hintdata even though the memory holding the hintdata
> may well have been re-used. Checking for phd->pml != NULL is not
> really sufficient - it's only luck that the re-use of this block
> hasn't put some other non-zero data in this element.

I've rewritten the Hint window a bit, making sure that the correct stuff
is freed. I'll commit the patch later.

Jørn

BTW, do you subscribe to the mailing list? 

-- 
Joern Thyssen, PhD
Vendsysselgade 3, 3., DK-9000 Aalborg, Denmark
+45 9813 2791 (private) / +45 2077 2689 (mobile) / +45 9633 7036 (work)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]