-vgc Info ok?

ketmar via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon May 18 07:34:38 PDT 2015


On Mon, 18 May 2015 14:30:42 +0000, Chris wrote:

> The following
> 
> string[string] myarray = ["key":"value"];
> string entry;
> entry = myarray["key"]; // => vgc: indexing an associative array may
> cause GC allocation
> 
> Why is _accessing_ an assoc treated as indexing it?

it can throw "out of range" error, which is `new`ed.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20150518/eba10517/attachment-0001.sig>


More information about the Digitalmars-d-learn mailing list