Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!rochester!cornellcs!newsstand.cit.cornell.edu!news.kei.com!nntp.coast.net!torn!nott!cunews!dbuck
From: dbuck@superior.carleton.ca (Dave Buck)
Subject: Re: Garbage Collection ?
X-Nntp-Posting-Host: superior.carleton.ca
Message-ID: <DJH29H.BLs@cunews.carleton.ca>
Sender: news@cunews.carleton.ca (News Administrator)
Organization: Carleton University, Ottawa, Canada
References: <INFO-CLS%95121116540159@vm.gmd.de>
Date: Tue, 12 Dec 1995 11:51:17 GMT
Lines: 31

In article <INFO-CLS%95121116540159@vm.gmd.de>,
Axel Berle  <POSMEC10%BRUFU.BitNet@pucc.PRINCETON.EDU> wrote:
>One aspect of C++ that I would like to comment is the problem of
>'garbage collection' in comparison with other languages like EIFEL.
>With C++ the programmer is fully responsible for object memory allocation
>and deallocation. 'Forgotten' objects result in memory leaks.

This is a serious and annoying problem in C++ and one that's very
difficult to detect and fix.  There have been third party garbage
collectors built for C++ but IMHO they change the way you must work
with and think about C++.

>Are there any special mecanisms for memory management in EIFEL or Smalltalk?

Smalltalk and (I'm quite sure) Eiffel both have garbage collection.
It's not possible in Smalltalk to have a memory leak. It is possible
to have the related problem that unwanted objects are kept in memory
because they are, in fact, being referenced in a way you are not aware
of.  This often happens thanks to the dependency mechanism.  In my
experience, it's much easier to detect, find and fix these problems in
Smalltalk than it is to find and fix memory leaks in C++.

David Buck
dbuck@ccs.carleton.ca

_________________________________
| David K. Buck                 |
| dbuck@ccs.carleton.ca         |
| The Object People             |
|_______________________________|

