RE: Re[4]: New WinClass C++ Style Library (Short)

new topic     » topic index » view thread      » older message » newer message

Elliott Sales de Andrade wrote:
> 
> 
>   I traced this, and found the error is on line 94 of WndClassEx. >It is 
> free(aCN), when it should be free(lpCN). However, this is not 
> >recommendable 
> because that will mean that there is no memory location for Windows >to 
> look 
> at for the class name. lpCN and lpMN should be freeed after calling 
> RegisterClass. I suspect that in 2.4, which doesn't crash, the new 
> >exception 
> handler is catching the error, but not bothering to tell us, for >some 
> reason.
> 
> PS. I CC'd this to your e-mail address because Topica seems really >slow 
> 
> today.
> 
> >From: aku saya <akusaya at gmx.net>
> >Reply-To: EUforum at topica.com
> >To: EUforum <EUforum at topica.com>
> >Subject: Re[4]: New WinClass C++ Style Library (Short)
> >Date: Thu, 19 Jun 2003 23:37:08 +0700
> >
> >
> > >> A> Hello Aku,
> > >>
> > >> A> Thanks for trying it.
> > >>
> > >> A> You probably have to rem line 105 in ChooseColor.ew, the
> > >> A> ChooseColor class file.
> > >>
> > >> A> If you have any more problems, please let me know ok?
> > >>
> > >> I tried to do that but the result is the same.
> > >>
> > >> I traced it and found that the problem is:
> > >>
> > >> Demo_01.exw:52        include RaisedButton.ew as RaisedButton
> > >> RaisedButton.ew:207   WCE:Put(WCE1)
> > >>
> > >>                       ^ here it is
> > >>
> > >> But I don't know how to fix it.
> > >>
> > >>
> >A> Hello again Aku,
> >
> >A> Thanks for the info.
> >
> >A> What version of Euphoria are you running?
> >
> >ver 2.3.
> >
> 
Hello again Elliott,

Thanks for looking into this.  Your information together with
aku's led me right to the problem!
You were right about line 94, and line 97 had the same problem,
again with the 'freeing' of a pointer smile

As i was telling aku, a temporary fix is to rem out line
94 and line 97 like this:


Line 94:
    --free(aCN)

Line 97:
    --free(aMN)

This will leave the tinyest memory leak until the application
is terminated normally, but the program runs fine otherwise
so you can at least get an idea what the demo looks like.

Im going to submit a new file to Rob to replace the old one also.

Thanks again,
Al

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu