Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Re: Weak pointers
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 1997-03-18 (09:39)
From: Kohler Markus <kohlerm@b...>
Subject: Re: Weak pointers
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                   |