Re: memory access problem

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 UTC