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
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
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
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.
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
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