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

Re: Deleting anchors

From: Henrik Frystyk Nielsen <frystyk@w3.org>
Date: Thu, 17 Dec 1998 15:51:03 -0500
To: www-lib@w3.org
Message-ID: <36796EB7.CFE034BF@w3.org>
To: Jim_Ravan@avid.com

Jim_Ravan@avid.com wrote:
> I must have a misconception about anchors. I have one "read something"
> routine and one "write something" routine. Each of them creates one anchor.
> The reader creates an anchor to reqpresent the desination, and the writer
> creates a tmpAnchor to represent the source buffer. Both routines attempt
> to delete the anchors when they exit. This turns out to be a bad idea,
> because the next time libwww does *anything* with anchors, it crashes. When
> should I delete anchors? I'm really just trying to be a good memory citizen
> and not create memory leaks. Programmers get very nervous when they see
> code create an object and then find that the routine exits before deleting
> it.

Anchors are kind of tricky as they are referenced from a lot of places.
Essentially, they represent the part of the Web that the user has been
in touch with. Currently, there is no reference count on anchors so they
are very hard to delete on an individual basis. It is safe, however, to
delete them all if that is possible.

It would also be very nice if anchors in fact could serialized to disk -
that way an application can pick them up later on. It is very similar to
the persistent cache


but anchors furthermore contain the link relations - the persistent
cache doesn't. I am looking for volunteers for helping on this - I don't
have time to work on this for the moment.

Received on Thursday, 17 December 1998 15:51:07 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:33:48 UTC