RE: Memory (de)allocation issues...

I think this needs work as well.  I guess I am just agreeing.  I once
traced a bug back to a double pointer (timer to a callback and such)
like what he is talking about and it was a mess tracing down the bug.
I ended up coming up with a library reset routine which seemed to work
but resets all of the memory in the libwww library.

-----Original Message-----
From: Peter Stamfest [mailto:peter.stamfest@eunet.at]
Sent: Tuesday, August 29, 2000 5:31 PM
To: www-lib@w3.org
Subject: Memory (de)allocation issues...




Hi, 

Really, memory management in libwww is horrible. Due to the extremely
tight forward/backward coupling of objects through pointers it is nearly
impossible to find a combination of *_deleteAll calls that does not
involve access to previously freed memory or the like. Even the sequence
used in HTLibTerminate() is not safe and has exactly that problem. 

In my application, HTChannel_deleteAll() somehow does exactly
this: accessing memory previously freed.

Are there any plans to work on this issue? The missing point seems to be 
the definition of what object owns what object.

As you may see I'm a bit frustrated with this.....

peter

Received on Wednesday, 30 August 2000 08:48:17 UTC