Suppose an array is being used like a FIFO:

-----------------------
T[] slice;

// Add:
slice ~= T();

// Remove:
slice = slice[1..$];
-----------------------

Assuming of course there's no other references to the memory, as this gets used, does the any of the memory from the removed elements ever get GC'd?

Also, if this is a long-running process, isn't there a potential danger in the array just marching through the address space and running out of room? (ie either running out of of continuous space, or hitting 0xFFF....)

Reply via email to