W3C home > Mailing lists > Public > www-lib@w3.org > July to September 2000

Re: memory access problem

From: Elliot Yan <lyan@centergate.com>
Date: Wed, 19 Jul 2000 17:01:15 -0400 (EDT)
Message-ID: <39761712.8633DF35@centergate.com>
To: Jim Marshall <jim_marshall2268@hotmail.com>
CC: www-lib@w3.org
Jim Marshall wrote:

> Earlier I asked a question about the termination handler, I got a response
> and incorporated the change, everything seemed to work fine, except my
> debugger now tells me that there is an attmpt to access invalid memory.
> Specifically this code:
>
> /*      Physical Address
> **      ----------------
> */
> PUBLIC char * HTAnchor_physical (HTParentAnchor * me)
> {
>     return me ? me->physical ? me->physical : me->address : NULL;
> }
>
> located in HTAnchor.c.  I've not seen the tiernary operator used this way,
> so I'm not sure what might be wrong or what it's trying to do.
>
> I duplicated this in the 'postform.c' example, but replacing the 'exit(0);'
> line of code in the terminate_handler with the following:
>
>     HTEventList_stopLoop();
>     return (HT_OK);
>

I too had similar problem   I put initalization and profile_delete OUTSIDE the
loop... you do stoploop first, then you delete profile.  That seems to work.
But it will incur an horrible horrible memory leak.

- E


Received on Wednesday, 26 July 2000 03:40:20 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:37 GMT