Associative arrays rehashing.

Jarrett Billingsley kb3ctd2 at yahoo.com
Sat Dec 8 17:37:40 PST 2007


""Jérôme M. Berger"" <jeberger at free.fr> wrote in message 
news:fjenc4$2joo$1 at digitalmars.com...
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> I was wondering, if I call .rehash on an existing AA, do I need to
> assign the returned value to the original array (eg: "a=a.rehash;")
> or is simply calling .rehash sufficient (eg: "a.rehash;")?

Just calling it is sufficient.  AA variables are really pointers to a 
structure which holds a reference to the actual table.  Once you've filled 
in an AA, no matter how much you modify it, that original structure never 
moves. 




More information about the Digitalmars-d-learn mailing list