Garbage collector memory leak "feature"?
Bill Baxter
dnewsgroup at billbaxter.com
Wed Oct 10 08:46:56 PDT 2007
0ffh wrote:
>
> More comments on what
>
> Steven Schveighoffer wrote:
>> 1. Is this just the way all garbage collectors are? Is there not a
>> way to solve this problem?
>
> No, only "conservative" gcs. There are also "exact" gc, but they have one
> big drawback: No void* type at all is possible!
> So either you want them, then you must use a conservative gc, or you don't
> then you can have an exact gc.
> D wants void*, so there is just no way round.
I think the main outstanding issues with D's GC are not so much about
existence of void* but rather inability to differentiate between pointer
and non-pointer data within a class. Just having void* isn't what's
causing the headaches here from what I can tell. It's that a hash value
or floating point value stored in the same aggregate as a pointer is
also treated as a pointer. That seems fixable through the use of extra
time, space, or both.
>> 3. If it is solvable, is anyone working on this? If not, they should
>> be. Add this to the list of things that need to be fixed before D has
>> widespread adoption. Memory leaks == bad bad bad.
>
> It is not technically correct to call prudently retained memory blocks
> a "memory leak". Those are distinct concepts, in my book at least.
Agreed. But I don't know what the proper term is. And apparently you
don't either or you would have given us something better than "prudently
retained memory blocks". Ghost references maybe?
--bb
More information about the Digitalmars-d
mailing list