Suspect the usage of WeakEventListener is incorrect. E.g.,
var weakEvent = new WeakEventListener<AdaptiveTrigger, CoreWindow,
WindowSizeChangedEventArgs>(this)
{
OnEventAction = (instance, s, e) => OnCoreWindowOnSizeChanged(s, e),
...
};
private void OnCoreWindowOnSizeChanged(CoreWindow sender, WindowSizeChangedEventArgs args)
{
OnEventAction is assigned an lambda. The lambda captures this (implicitly as this.OnCoreWindowOnSizeChanged). Thus weakEvent holds a strong reference to event target this.
Thanks for this inspiring project!
Suspect the usage of WeakEventListener is incorrect. E.g.,
OnEventActionis assigned an lambda. The lambda capturesthis(implicitly asthis.OnCoreWindowOnSizeChanged). ThusweakEventholds a strong reference to event targetthis.Thanks for this inspiring project!