Re: Weak pointers

From: Kohler Markus (
Date: Tue Mar 18 1997 - 16:51:46 MET

Message-Id: <>
To: Damien Doligez <>
Subject: Re: Weak pointers
In-Reply-To: Damien.Doligez's message of Tue, 18 Mar 1997 15:34:54 +0100.
Date: Tue, 18 Mar 1997 15:51:46 +0000
From: Kohler Markus <>

> >The problem is that if you delete an element in the tree it may be that the
> >hash table still points to the node, because there was no garbage collection
> >yet. It could be possible that you would still find the entry trough the hash
> >table.
> I don't see a problem here. You find the entry and use it instead of
> allocating a new node. This is a rather good thing. It means you
> avoid allocating, and leave less garbage for the GC to collect.

But how do you know then that value is not valid anymore ?
I you use a flag to indicate that then I don't see an advantage of using a
weak pointer.
The same could be done with a "normal" pointer.



| Markus Kohler                          Hewlett-Packard GmbH                |
| Software Engineer                      Network & System Management Division| 
|                                        IT/E Success Team                   |

This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:09 MET