473,385 Members | 1,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Mark an object for garbage collection

Yu
Hi,

Can anyone tell me how I can mark an object for garbage
collection in vb.net?

Thanks,

Yu
Nov 20 '05 #1
2 1102
* "Yu" <an*******@discussions.microsoft.com> scripsit:
Can anyone tell me how I can mark an object for garbage
collection in vb.net?


Remove the references which point to the object.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #2
In addition to removing the references that are pointing to the object
Setting it equal to Nothing will also mark it for GC.

Dan

"Yu" <an*******@discussions.microsoft.com> wrote in message
news:09****************************@phx.gbl...
Hi,

Can anyone tell me how I can mark an object for garbage
collection in vb.net?

Thanks,

Yu

Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Ian Renfrew | last post by:
Does Javascript supply a function that destroys an object? If so, is there a dependancy on Javascript version? Thanks in advance, Ian Renfrew
7
by: cmrchs | last post by:
Hi, how do you mark an object for garbage collection in C++.NET 2005 ? MyDbClass^ obj = gcnew MyDbClass(); // Release the object obj = 0; --> COMPILER ERROR obj = nullptr; // nope : this...
9
by: Rob Nicholson | last post by:
Is it possible to trap the creation of a new object and carry out other operations after it's been created? For example, if creating an object of a specific type, then add a reference to a global...
12
by: Mike Eaton | last post by:
Hi all, What do people regard as the best practice with respect to freeing object references when you're done with them? Some people I've worked with in the past suggested that if you create an...
2
by: bughunter | last post by:
This is partly 'for the record' and partly a query about whether the following is a bug somewhere in .Net (whether it be the CLR, JITter, C# compiler). This is all in the context of .Net 1.1 SP1. ...
13
by: | last post by:
Hi all, Coming from the good old VB6 days we were told to always destroy our objects as follows:- Dim obj as New MyObject ' do some work with obj obj = Nothing I have been doing this in...
20
by: Justin Rich | last post by:
so im trying to be good and not leave anything hanging open but i guess ive seen a variety of ways to kill objects.. is there like a recommended way? basically im looking for best practices for...
11
by: Jay Dee | last post by:
Object garbage collection of events I can not help wondering how the garbage collection system handles events. If I release all references to an object that has a void that an event somewhere...
158
by: pushpakulkar | last post by:
Hi all, Is garbage collection possible in C++. It doesn't come as part of language support. Is there any specific reason for the same due to the way the language is designed. Or it is...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.