|
-
Nov 2nd, 2004, 04:22 PM
#1
Garbage Collection
I've been wondering about something now that I've done a bit in .NET. How reliable is the garbage collection?
In a sub, I could create a command, a dataset, a datareader, a new form, etc. Then at the end of the sub, what happens if I do not dispose of them? In C++ (unmanaged) you get a memory leak if you use New to acquire memory, and fail to free it up after you are done with it. New doesn't seem to serve the same purpose in .NET, but in some cases it serves a similar purpose.
Is it simply good practice to dispose of locally declared (dimmed) variables, or is it necessary to avoid memory leaks?
My usual boring signature: Nothing
 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|