DynamoDS/Dynamo — pull request #2222 by ke-yu (2014-08-25 09:40:56+00:00)
Title: Fix memory management issue in static property

This pull request is to fix defect [MAGN-336 array modification inside function crashes due to garbage collection in the following case] (http://adsk-oss.myjetbrains.com/youtrack/issue/MAGN-336).

It is because when assigning a value to a static property, the reference count of that value is not increased. ``TypeSystem.Coerce()`` may allocate a new array if it needs to do type coercion for elements in an array, so ``GCRetain()`` should be called on the return value from ``TypeSystem.Coerce()``.

Notice register ``FX`` is never used, so some code clean up for ``FX`` register.

Regression test case Regression_MAGN336 is added.

Run language test cases to ensure no regression.