DynamoDS/Dynamo — pull request #2890 by ke-yu (2014-10-29 09:21:38+00:00)
Title: Inherit from NotificationObject to avoid memory leak in data binding

This pull request is part of attempt to fix memory leak on Revit.

Related pull request:
- https://github.com/DynamoDS/Dynamo/pull/2888

Looking at some retention paths, notice because some objects are referenced from system object, ``RevitDynamoModel`` is not released (see images attached at the end of comment).

These objects looks innocent, but according to [this article](http://blogs.msdn.com/b/micmcd/archive/2008/03/07/avoiding-a-wpf-memory-leak-with-databinding-black-magic.aspx), memory could easily be leak due to data binding. The solution is "Anything involved in a databinding should implement ``INotifyPropertyChanged``" (:-()

I didn't dig too deep. But inheriting from ``NotificationObject`` removes these objects on ``RevitDynamoModel``'s reference retention path.

``RevitDynamoModel`` is still referenced by other objects, but locally I've fixed it. I'll send the fix in other pull request.

- [ ] @ikeough
- [ ] @Benglin

* SearchModel

![3](https://cloud.githubusercontent.com/assets/2600379/4823164/04599c60-5f4c-11e4-8ef2-7cb4f04bbb03.png)

* ShortCutBarItem

![1](https://cloud.githubusercontent.com/assets/2600379/4823165/045ef0de-5f4c-11e4-82c3-5720b93c72c0.png)

* StartPageListItem

![2](https://cloud.githubusercontent.com/assets/2600379/4823166/04681bd2-5f4c-11e4-85d5-51fb17c5cd2c.png)