Click here to Skip to main content
15,916,949 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Convert Into Integer Pin
Wayne Gaylard23-Feb-10 23:27
professionalWayne Gaylard23-Feb-10 23:27 
GeneralRe: Convert Into Integer Pin
Thomas Krojer23-Feb-10 23:47
Thomas Krojer23-Feb-10 23:47 
AnswerRe: Convert Into Integer Pin
Richard MacCutchan23-Feb-10 22:10
mveRichard MacCutchan23-Feb-10 22:10 
GeneralRe: Convert Into Integer Pin
Anubhava Dimri23-Feb-10 22:16
Anubhava Dimri23-Feb-10 22:16 
AnswerRe: Convert Into Integer Pin
David Skelly24-Feb-10 1:52
David Skelly24-Feb-10 1:52 
QuestionExcel 2007 Macro/VB Question DDE Question Pin
ProTrader2223-Feb-10 15:39
ProTrader2223-Feb-10 15:39 
AnswerRe: Excel 2007 Macro/VB Question DDE Question Pin
TheComputerMan25-Feb-10 1:22
TheComputerMan25-Feb-10 1:22 
QuestionHow to dispose cleanup object inside a class that inherits the treenode class [modified] Pin
andre de jong22-Feb-10 20:16
andre de jong22-Feb-10 20:16 
Hello Fellow Programmers,

I have a treeview with treenodes holding an object.

When the Treeview is closed I wan't to properly dispose all objects inside all Treenodes.
The memory usage keeps growing.


I've added the dispose interface but I don't know how to trigger the event.
There is no event inside a treenode class that is triggert when the treeview is closed.
Or is there?


Public Class MenuTreeNode
Inherits TreeNode
Implements IDisposable

private m_Menu as menu

end class



I solved the problem to add the dispose handler from all treenodes to the treeview.HandleDestroyed event
All treenodes are now cleaned up when the handle is Destroyed.

Is this a good approach?

Thanks in Advance
modified on Tuesday, February 23, 2010 2:47 AM

AnswerRe: How to dispose cleanup object inside a class that inherits the treenode class Pin
Dave Kreskowiak23-Feb-10 3:52
mveDave Kreskowiak23-Feb-10 3:52 
GeneralRe: How to dispose cleanup object inside a class that inherits the treenode class Pin
andre de jong23-Feb-10 4:58
andre de jong23-Feb-10 4:58 
GeneralRe: How to dispose cleanup object inside a class that inherits the treenode class Pin
Dave Kreskowiak23-Feb-10 6:53
mveDave Kreskowiak23-Feb-10 6:53 
GeneralRe: How to dispose cleanup object inside a class that inherits the treenode class Pin
andre de jong23-Feb-10 8:12
andre de jong23-Feb-10 8:12 
GeneralRe: How to dispose cleanup object inside a class that inherits the treenode class Pin
Dave Kreskowiak23-Feb-10 9:05
mveDave Kreskowiak23-Feb-10 9:05 
GeneralRe: How to dispose cleanup object inside a class that inherits the treenode class Pin
andre de jong23-Feb-10 10:44
andre de jong23-Feb-10 10:44 
GeneralRe: How to dispose cleanup object inside a class that inherits the treenode class Pin
Dave Kreskowiak23-Feb-10 11:48
mveDave Kreskowiak23-Feb-10 11:48 
Questionsqlserver is installed in system or not??? [modified] Pin
mehrnoosh22-Feb-10 19:37
mehrnoosh22-Feb-10 19:37 
AnswerRe: sqlserver is installed in system or not??? Pin
JustWorking23-Feb-10 1:40
JustWorking23-Feb-10 1:40 
AnswerRe: sqlserver is installed in system or not??? Pin
Steven J Jowett23-Feb-10 3:19
Steven J Jowett23-Feb-10 3:19 
QuestionProgramming language Pin
neothematrix22-Feb-10 11:57
neothematrix22-Feb-10 11:57 
AnswerRe: Programming language Pin
kilkfoe122-Feb-10 12:41
kilkfoe122-Feb-10 12:41 
GeneralRe: Programming language Pin
neothematrix22-Feb-10 12:45
neothematrix22-Feb-10 12:45 
AnswerRe: Programming language Pin
Luc Pattyn22-Feb-10 13:00
sitebuilderLuc Pattyn22-Feb-10 13:00 
GeneralRe: Programming language Pin
neothematrix22-Feb-10 13:11
neothematrix22-Feb-10 13:11 
GeneralRe: Programming language Pin
kilkfoe123-Feb-10 8:51
kilkfoe123-Feb-10 8:51 
Question.Net remoting: Reactivating proxy object Pin
kilkfoe122-Feb-10 8:08
kilkfoe122-Feb-10 8:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.