Hash Tables in D
Martin Nowak via Digitalmars-d-announce
digitalmars-d-announce at puremagic.com
Mon Jan 4 11:58:03 PST 2016
On 01/04/2016 09:06 AM, Bastiaan Veelo wrote:
>
> This would be a bug (segfault on my machine):
>
>> foreach (key; aa.byKey)
>> aa.remove(key);
>
> Note that, in this example, there is no need to remove every element
> separately, you can also just do
Sorry my mistake, I never use aa.keys (instead of aa.byKey) b/c it
allocates.
So it's still sort of a bug to recommend people allocating an array ;).
More information about the Digitalmars-d-announce
mailing list