Skip to content

Commit bdfbfd2

Browse files
committed
[修复](事件): 事件的关闭就释放导致后续打开的事件对象出现空的问题
1 parent 50c23e1 commit bdfbfd2

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

Runtime/UIForm.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -298,13 +298,7 @@ public virtual void OnClose(bool isShutdown, object userData)
298298
gameObject.SetLayerRecursively(m_OriginalLayer);
299299
m_Available = false;
300300
Visible = false;
301-
if (m_EventSubscriber != null)
302-
{
303-
m_EventSubscriber.UnSubscribeAll();
304-
ReferencePool.Release(m_EventSubscriber);
305-
}
306-
307-
m_EventSubscriber = null;
301+
m_EventSubscriber?.UnSubscribeAll();
308302
}
309303

310304
/// <summary>

0 commit comments

Comments
 (0)