microsoft / XamlBehaviors

This is the official home for UWP XAML Behaviors on GitHub.
MIT License
697 stars 112 forks source link

Fix for native behavior memory leak #118

Closed jamcems closed 7 years ago

jamcems commented 7 years ago

This fixes a memory leak which occurs with all native behaviors.

The leak was caused by BehaviorCollection holding a strong reference to the associated object that the behaviour is attached to.

With this change a weak reference is held and is resolved through the property getter. The change is minimal as any private references to the member went via the getter already.

msftclas commented 7 years ago

Hi @jamcems, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

It looks like you're a Microsoft contributor (James McElroy). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;