Dispose releases the operating system resources, associated with the *TableView.
()
| 336 | // Dispose releases the operating system resources, associated with the |
| 337 | // *TableView. |
| 338 | func (tv *TableView) Dispose() { |
| 339 | tv.columns.unsetColumnsTV() |
| 340 | |
| 341 | tv.disposeImageListAndCaches() |
| 342 | |
| 343 | if tv.hWnd != 0 { |
| 344 | if !win.KillTimer(tv.hWnd, tableViewCurrentIndexChangedTimerId) { |
| 345 | lastError("KillTimer") |
| 346 | } |
| 347 | if !win.KillTimer(tv.hWnd, tableViewSelectedIndexesChangedTimerId) { |
| 348 | lastError("KillTimer") |
| 349 | } |
| 350 | } |
| 351 | |
| 352 | if tv.hwndFrozenLV != 0 { |
| 353 | tv.group.toolTip.removeTool(tv.hwndFrozenHdr) |
| 354 | win.DestroyWindow(tv.hwndFrozenLV) |
| 355 | tv.hwndFrozenLV = 0 |
| 356 | } |
| 357 | |
| 358 | if tv.hwndNormalLV != 0 { |
| 359 | tv.group.toolTip.removeTool(tv.hwndNormalHdr) |
| 360 | win.DestroyWindow(tv.hwndNormalLV) |
| 361 | tv.hwndNormalLV = 0 |
| 362 | } |
| 363 | |
| 364 | if tv.formActivatingHandle > -1 { |
| 365 | if form := tv.Form(); form != nil { |
| 366 | form.Activating().Detach(tv.formActivatingHandle) |
| 367 | } |
| 368 | tv.formActivatingHandle = -1 |
| 369 | } |
| 370 | |
| 371 | tv.WidgetBase.Dispose() |
| 372 | } |
| 373 | |
| 374 | func (tv *TableView) applyEnabled(enabled bool) { |
| 375 | tv.WidgetBase.applyEnabled(enabled) |
no test coverage detected