GC object finalization not guaranteed

Leandro Lucarella llucax at gmail.com
Sun Apr 19 09:49:01 PDT 2009


Leandro Lucarella, el 19 de abril a las 13:08 me escribiste:
> Don, el 19 de abril a las 07:35 me escribiste:
> > Leandro Lucarella wrote:
> > >I think shared memory is an example of memory resource that's not freed by
> > >the OS on program exit.
> > 
> > Really? That sounds like an OS memory leak. Security issue, too: run
> > your program, allocated shared memory, then exit. Repeat until all
> > memory is exhausted.
> 
> man 3 shm_open
> 
> Anyways. Again, the discussion is diverging very quickly. The point is,
> according to the specs, the GC is allowed to not call finalizers at all.
> So any current D program relying on the GC calling a destructor *ever* is
> broken according to the specs, even when destructors are used for weak
> pointers, for freeing malloc'ed memory or anything.
> 
> I think finalizers should be removed or fixed (I vote for the latter,
> because it's easy and efficient to fix it).
> 
> Even more, I'm considering this a bug in the specs even for D1, so I'll
> file a bug for this.

http://d.puremagic.com/issues/show_bug.cgi?id=2858

-- 
Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/
----------------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------------
Aprendan de la primavera, que antecede al verano, precede al inverno y
no lo anda diciendo por ahí.
	-- Ricardo Vaporeso. Llanos de Luzuriaga, 1914.



More information about the Digitalmars-d mailing list