Re: Weak pointers

From: Kohler Markus (
Date: Tue Mar 18 1997 - 08:43:49 MET

Message-Id: <>
Subject: Re: Weak pointers
Date: Tue, 18 Mar 1997 07:43:49 +0000
From: Kohler Markus <>

I didn't take a look at Java's weak pointers, but I assume it's same as in

In Smalltalk a weak pointer is not counted when the garbage checks if the
object is still referenced. That means if you have only weak pointers to an
object and the application needs memory it will be garbage collected.

In Smalltalk theres is a correspinding concept called "finalization".
If a weak object is garbage collected a finalize message is called.
This is used in Smalltalk to free external resources like windows.


| 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