()
| 148 | #region IDisposable Members |
| 149 | |
| 150 | public void Dispose() |
| 151 | { |
| 152 | if (mNative != IntPtr.Zero) |
| 153 | { |
| 154 | DestroyChilds(); |
| 155 | if (mParent != null) |
| 156 | { |
| 157 | mParent.mChilds.Remove(this); |
| 158 | mParent = null; |
| 159 | } |
| 160 | else |
| 161 | { |
| 162 | mRoots.Remove(this); |
| 163 | } |
| 164 | |
| 165 | if (!mIsWrap) |
| 166 | ExportGui_DestroyWidget(mNative); |
| 167 | |
| 168 | ExportGui_UnwrapWidget(mNative); |
| 169 | mWidgets.Remove(mNative); |
| 170 | |
| 171 | mNative = IntPtr.Zero; |
| 172 | } |
| 173 | } |
| 174 | |
| 175 | #endregion |
| 176 |
no test coverage detected