W3C home > Mailing lists > Public > www-lib@w3.org > October to December 1998

Re: advice on leaking HTStreamStacks ?

From: Henrik Frystyk Nielsen <frystyk@w3.org>
Date: Tue, 13 Oct 1998 15:57:36 -0400
Message-Id: <3.0.5.32.19981013155736.029dc100@localhost>
To: Mike Bennett <mbennett@netcom.com>, www-lib@w3.org
At 11:19 10/13/98 -0700, Mike Bennett wrote:
>I've found a leak of HTStream's as allocated from HTTPStatus_new() which
>I'd like to solicit advice about the correct manner to address.  I expect
>I might be doing something wrong in my use of libw3 so I'd appreciate
>any help along these lines.
>
>I'm writing a driver that will, for purposes of this mail, rerequest 
>the same document some parameterized number of times.  To do this,
>I use the HTNet_addAfter callback and call HTLoadAnchor() when
>a request is finished.  I use the standard HTEventList_loop dispatch 
>loop from my main() routine.

Are you reusing the request object? This may cause problems - the best is
to create a new request object for every request. The streams should
normally be freed (I think) in that case. Have you had a look at the
repeated load sample program

	http://www.w3.org/Library/Examples/multichunk.c

Does this do what you want?

Henrik
--
Henrik Frystyk Nielsen,
World Wide Web Consortium
http://www.w3.org/People/Frystyk
Received on Tuesday, 13 October 1998 15:57:42 EDT

This archive was generated by hypermail pre-2.1.9 : Wednesday, 3 September 2003 17:59:19 EDT