Memory Safety without a GC or Ref Counting

TommiT tommitissari at hotmail.com
Fri Jan 25 04:54:08 PST 2013


On Friday, 25 January 2013 at 12:05:42 UTC, F i L wrote:
> The issue you raise isn't really a problem though. If the 
> memory gets rearranged then the runtime could inform the 
> DynamicArray, and it, in turn, could reassign those refs to the 
> new memory address.
>

Oh, of course. By the way, what exactly are those things pointed 
to by the refs member of DynamicArray? Are they 
references/pointers to reference variables, or something?

One thing I don't like this design is that even if I never make 
any ref variables that point to the elements of a certain 
DynamicArray arr, that arr still has to have the member data 
refs, and has to do some extra work inside func-=(item).





More information about the Digitalmars-d mailing list