#Garbage collection
15-Jun-95 11:04:01
Sb: #47208-#Garbage collection
Fm: Greg Comeau@Comeau Cmptg 72331,3421
To: Clay Spence 72713,2540
>The advantage of garbage collecting allocators is that you don't have to worry
>about freeing things. With complex dynamic data structures, it can be
>difficult to decide on and stick to a discipline that assigns responsibility
>for freeing memory to the appropriate functions. With garbage collection, you
>just stop using the block of memory. The lack of a pointer to an allocated
>block of memory will result in the block being freed when the collection code
>is run. You can concentrate on other aspects of coding. (Perhaps I'm just a
>sloppy programmer. 🙂
Just for the sake of discussion, that same advantage can be a disadvantage.
As with everything, it depends upon what you are trying to do and is not
100% to allow you to concentrate on other aspects of coding. That is to
say, for something it can indeed free you "from the concern." On others,
this freedom can be quite intrusive. As such, as with everything, it should
be used as deemed appropriate.
>I assume the Amiga port of the garbage collector has some means of freeing
>everything remaining when the program terminates, perhaps by hooking them into
>the task structure at whatever that field is.
Probably, do not doubt its "calculated" and/or even explicitly invoked.
>Do you mean people aren't interested because they can't sell their programs?
>Is nobody programming for the Amiga?
Enough people have put it to rest and seems to be slowly and surely
more and more. This is no real suprise.