home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!usc!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!att!allegra!alice!ark
- From: ark@alice.att.com (Andrew Koenig)
- Newsgroups: comp.lang.modula3
- Subject: Re: references, objects & m3
- Message-ID: <24699@alice.att.com>
- Date: 25 Jan 93 19:35:20 GMT
- Article-I.D.: alice.24699
- References: <C1BsMI.5Ay@undergrad.math.waterloo.edu> <MOSS.93Jan24164146@CRAFTY.cs.cmu.edu> <C1E30F.vx@undergrad.math.waterloo.edu> <FN00.93Jan25085601@tahoe.gte.com>
- Reply-To: ark@alice.UUCP ()
- Organization: AT&T Bell Laboratories, Murray Hill NJ
- Lines: 15
-
- In article <FN00.93Jan25085601@tahoe.gte.com> fn00@gte.com (Farshad Nayeri) writes:
-
- > - Because of garbage collection, destructors are not as crucial in
- > Modula-3 programming. (What do you usually do in a destructor in
- > C++?)
-
- If C++ had garbage collection, destructors would sometimes still be
- useful. For example, if I have an object that represents a window in
- my window system, I really do want the window to go away as soon as
- the object is no longer in use, rather than waiting around for the
- next garbage collection. A similar argument applies to flushing the
- buffer of an I/O library structure as soon as possible.
- --
- --Andrew Koenig
- ark@europa.att.com
-