#Garbage collection
14-Jun-95 23:25:32
Sb: #47206-#Garbage collection
Fm: Clay Spence 72713,2540
To: Werner Kazmierzak 100041,1320
Hi, Werner,
>>well, in new programming projects, I tend to use pooled memory allocation
using the LibAllocPooled() routine (et al) from AmigaLib V 40.14.<<
I only have the RKM manuals, so I don't know about allocPooled, etc. Do they
release memory automatically?
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. 🙂
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.
>>Unfortunately, there is very little request for new profitable projects on
the Amiga in the moment.<<
Do you mean people aren't interested because they can't sell their programs?
Is nobody programming for the Amiga?
Clay