DynamoDS/Dynamo — pull request #2440 by ke-yu (2014-09-17 08:35:17+00:00)
Title: Increase reference count for array elements

This pull request continues the fix for [memory corruption issue in multi output node] (http://adsk-oss.myjetbrains.com/youtrack/issue/MAGN-4605#) and [this github issue] (https://github.com/DynamoDS/Dynamo/issues/2394).

``__TryGetValueFromNestedDictionarie()`` is used to get values from an output port of a multi output node. Because of lacing, the output of multi output node could be a nested array, so when getting values from multi output node, the returned values is a nested array as well. Although finally we increase the reference count of return value, but the reference count of its element is not increased, so its elements will be garbage collected.

My [previous pull request] (https://github.com/DynamoDS/Dynamo/pull/2419) fixed 1D dictionary. This pull request fixes nested array. This is result for the exampled provided by @holyjewsus (https://github.com/DynamoDS/Dynamo/issues/2394), now it is correct.

![untitled](https://cloud.githubusercontent.com/assets/2600379/4300508/652886e6-3e45-11e4-990a-9d772d03772b.png)

@junmendoza , @sharadkjaiswal , @lukechurch , you may help to review it.