- Previously, Window.ViewAdded event was blocked by memory leak
- This is enabled again by the request from Appium
- This change has beend checked locally and there was no memory leak (normal)
PositionUsesPivotPoint = false;
}
- //ToDo: this has memory leak and this is not used currently. will be fixed soon by using Event subscribing pattern.
- //_onWindowSendEventCallback = SendViewAddedEventToWindow;
- //this.OnWindowSignal().Connect(_onWindowSendEventCallback);
+ _onWindowSendEventCallback = SendViewAddedEventToWindow;
+ this.OnWindowSignal().Connect(_onWindowSendEventCallback);
if (!shown)
{
if (_onWindowSendEventCallback != null)
{
this.OnWindowSignal().Disconnect(_onWindowSendEventCallback);
+ _onWindowSendEventCallback = null;
}
// BaseHandle CPtr is used in Registry and there is danger of deletion if we keep using it here.