storing the hash multiplier instead of the hash value

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Mon Mar 22 19:46:46 PDT 2010


On 03/22/2010 08:32 PM, Robert Jacques wrote:
> On Mon, 22 Mar 2010 19:00:57 -0300, Andrei Alexandrescu
> <SeeWebsiteForEmail at erdani.org> wrote:
> [snip]
>> And the last idea before I forget (just talked to Walter about it) is
>> that the GC could and should offer functions:
>>
>> GC.preCollect(void delegate());
>> GC.postCollect(void delegate());
>>
>> That way we can effectively implement weak pointers.
>
> Pre and post collect should be an array of delegates. Otherwise only one
> person's weak pointer library would work.

Those are functions that you can call several times. The gc will keep 
indeed a container of delegates.

Andrei



More information about the Digitalmars-d mailing list