DynamoDS/Dynamo — pull request #2888 by ke-yu (2014-10-29 08:20:49+00:00)
Title: Not register event handler for Dispatcher.ShutdownStarted event

It is part of effort to fix memory leak issue on Revit...``RevitDynamoModel`` is referenced by many objects, when looking at the reference retention path, ``Dispatcher`` is one if them.

As ``Dispatcher`` is associated with thread, it is sort of static object, registering event handler for ``Dispatcher.ShutdownStarted`` prohibits the view from being garbage collected even it is unloaded. Plus, ``Dispatcher.ShutdownStarted`` is only fired when Revit application is shut down, it doesn't make sense to do "unload`` things in it. Replace them with ``Unloaded`` event.

Reviewers:

- [ ] @ikeough
- [ ] @Benglin