tangxu
2024-12-29 72e75456f8b30ec5b6f355539d9c883b0f810d21
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
 
namespace Microsoft.Windows.Forms
{
    partial class UIControl
    {
        /// <summary>
        /// 释放资源 
        /// </summary>
        /// <param name="disposing">释放托管资源为 true,否则为 false</param>
        protected override void Dispose(bool disposing)
        {
            IUIControl parent = this.UIParent;
            this.UIParent = null;
            if (parent != null)
                parent.DoLayout();
 
            if (this.m_UIControls != null)
            {
                this.m_UIControls.Dispose();
                this.m_UIControls = null;
            }
 
            if (this.m_Region != null)
            {
                this.m_Region.Dispose();
                this.m_Region = null;
            }
 
            if (this.m_Sprite != null)
            {
                this.m_Sprite.Dispose();
                this.m_Sprite = null;
            }
        }
    }
}