Don, el 18 de abril a las 23:43 me escribiste: > >>I don't understand why D even has finalizers. Can they do anything useful? > >Yes. I use them to manage GPU memory/resources. Another are wrapper classes > >around manually allocated arrays (to avoid the false pointer problem with > >very > >large arrays). Both of these examples don't require finalization at program > >termination (unlike file handles/sockets, etc) > > OK, those both make perfect sense -- they are both memory issues. It still > seems that gc is perfect for memory, but no good for anything else.
Well, you mean for resources the OS free for you at program end, right? For other resources is not useful because the not guaranteed finalization (if you don't have the OS to cover your ass, the GC won't either with this limitation). I think shared memory is an example of memory resource that's not freed by the OS on program exit. -- Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/ ---------------------------------------------------------------------------- GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05) ---------------------------------------------------------------------------- Ah, se va en 1981? Pero por qué? ... Ah, porque ya había sido determinado, entonces quiere decir que pronto vamos a elegir presidente nuevo nosot... Ah, nosotros no? Ah, lo van a elegir en la ... Ah! Quiere que le diga? Muy bien pensado, porque cada vez que lo elegimos nosotros no duran nada! -- Tato vs. Tato (1980, Gobierno de Videla)
