Click here to Skip to main content
15,917,005 members
Home / Discussions / Visual Basic
   

Visual Basic

 
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 
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 
You're actually hurting it, not optimizing it.

The Dispose method does NOT determine when the GC collects an object and frees memory. All Dispose does is give your object a chance to release resources that the GC cannot do itself, such as releaseing unmanaged handles to GDI objects, unmanaged memory allocations, ... Dispose does NOT in any way determine when an object is collected and its memory returned to the managed heap.

Again, why are you doing this? What makes you think you need to "optimize" garbage collection?

A guide to posting questions on CodeProject[^]



Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007, 2008
But no longer in 2009...




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 
QuestionMake Pen drive password protected. Pin
Gagan.2022-Feb-10 5:03
Gagan.2022-Feb-10 5:03 
AnswerRe: Make Pen drive password protected. Pin
Dave Kreskowiak22-Feb-10 6:22
mveDave Kreskowiak22-Feb-10 6:22 
AnswerRe: Make Pen drive password protected. Pin
Steven J Jowett23-Feb-10 3:24
Steven J Jowett23-Feb-10 3:24 
QuestionError while executing cmd command through vb.net Pin
Gagan.2022-Feb-10 4:00
Gagan.2022-Feb-10 4:00 
AnswerRe: Error while executing cmd command through vb.net Pin
Richard MacCutchan22-Feb-10 4:38
mveRichard MacCutchan22-Feb-10 4:38 
GeneralRe: Error while executing cmd command through vb.net Pin
Gagan.2022-Feb-10 4:52
Gagan.2022-Feb-10 4:52 
GeneralRe: Error while executing cmd command through vb.net Pin
Richard MacCutchan22-Feb-10 5:28
mveRichard MacCutchan22-Feb-10 5:28 

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.