DynamoDS/Dynamo — pull request #3260 by ke-yu (2014-11-25 05:23:02+00:00)
Title: Fix magn5128: GC: Turning nodes into custom node doesn't dispose objects created by nodes

This pull request is to fix defect [MAGN 5128: GC: Turning nodes into custom node doesn't dispose objects created by nodes] (http://adsk-oss.myjetbrains.com/youtrack/issue/MAGN-5128).

The root cause is global variable still is referenced from custom node after converting node to custom node. Suppose we have a node ``Point.ByCoordinates`` to create a point, this node will be compiled to:
```
var_1234 = Point.ByCoordinates(...); // suppose the GUID of this node is 1234
```
And after converting it to custom node, the following ASTs will be generated:
```
var_1234 = null; // try to dispose it
def func_5678() // suppose the GUID of custom node is 5678
{
var_1234 = Point.ByCoordinates(...);
return = var_1234;
}
```
Note variable ``var_1234`` is used in custom node, therefore the geometry that created by this custom node isn't associated with this custom node but with global variable ``var_1234``, so deleting custom node won't dispose the geometry (easier to reproduce with Revit's ``ReferencePoint``).

In #3007 we assign a new GUID to the nodes that are moved to custom work space. But their AST identifiers still the same. To avoid using out-dated AST identifier, we delete ``identifier`` from ``NodeModel``.

Reviewer:

- [ ] @Steell