home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / modula3 / 1149 < prev    next >
Encoding:
Internet Message Format  |  1993-01-25  |  1.2 KB

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