Re: Partial arrays reclaimed?

2017-01-31 Thread Ivan Kazmenko via Digitalmars-d-learn
On Friday, 27 January 2017 at 23:22:17 UTC, Nick Sabalausky wrote: 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

Re: Partial arrays reclaimed?

2017-01-29 Thread ag0aep6g via Digitalmars-d-learn
On Friday, 27 January 2017 at 23:22:17 UTC, Nick Sabalausky wrote: 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

Re: Partial arrays reclaimed?

2017-01-29 Thread Jonathan M Davis via Digitalmars-d-learn
On Friday, January 27, 2017 18:22:17 Nick Sabalausky via Digitalmars-d-learn wrote: > Suppose an array is being used like a FIFO: > > --- > T[] slice; > > // Add: > slice ~= T(); > > // Remove: > slice = slice[1..$]; > --- > > Assuming of course there's no

Re: Partial arrays reclaimed?

2017-01-27 Thread Adam D. Ruppe via Digitalmars-d-learn
On Friday, 27 January 2017 at 23:36:58 UTC, Stefan Koch wrote: It should reclaim the memory from the beginning of the array. I doubt the current implementation will though, you should check.

Re: Partial arrays reclaimed?

2017-01-27 Thread Stefan Koch via Digitalmars-d-learn
On Friday, 27 January 2017 at 23:22:17 UTC, Nick Sabalausky wrote: 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

Partial arrays reclaimed?

2017-01-27 Thread Nick Sabalausky via Digitalmars-d-learn
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