How i can clear Associative Arrays

Nicolas Guillemot nlguillemot at gmail.com
Sat Apr 13 02:09:35 PDT 2013


Hey gedaiu,

I'm still a novice to D, but here are some solutions I found. 
They can probably be improved.

1) Assigning to it an empty map
https://ideone.com/h7ffmD

2) Removing all entries
https://ideone.com/E7k2WL

My guess is that the first method is more efficient. I wish I 
knew how to do it without having to explicitly declare the 
"empty" variable.

Cheers.


More information about the Digitalmars-d-learn mailing list