I'm not sure if it's explicitly documented anywhere, but the explanation for the first issue can be gleaned from the new "Task Node Changes In Firmware Version 7.2" section here:
https://sdkdocs.roku.com/display/sdkdoc ... ph+ThreadsIn firmware version 7.2, on each transition of the Task node control state to "RUN", the render thread m is cloned, the original is passed to the new Task node thread, and the render thread retains the clone. Members of m which are basic types like integers, Booleans, strings, and floats are cloned. Associative arrays and arrays are cloned recursively. RoSGNodes are also cloned, but not recursively, since they are already thread-safe. This is all much like what would happen when an associative array is set to a field.
Associative arrays that are stored in Node fields are
cloned both on set and get, so you're not operating on the original AA. The only way to modify it would be to clone it to a local variable, change the value, then reset the "aa" field... All of which has obvious performance implications.
aa = g.aa : aa.x = 7 : g.aa = aa : ? g.aa
Interestingly, in the above line of code, the AA is cloned on three separate occasions... once when retrieved and stored in the local variable, again when reset to the local variable, and yet again when printed to the console.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)