473,385 Members | 2,162 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.

How to Work with Gabrage Collector

hi all, i´m noobie in .Net, and i need to know how to work with the cargabe
collector.

as an example
i have a button´s click event
with this code ..

private sub Button_EventClick (.....)
Dim frm as New frmForm ()
Frm.MdiParent = me
frm.show
end sub

after that, when do i call the garbage colector ?? if i don´t have access to
the form ?
my problem is that i have an aplication that comsumes lots of memory
i need todo some procedures to get more free memory.

thks
JSB
Nov 22 '05 #1
2 1582
You don't need to call the garbage collector explicitly, it runs
automatically when your application needs to free up some memory. Check out
this article for more information on how the garbage collection system
works.

http://www.ftponline.com/vsm/2002_12...a/default.aspx

--
Rob Windsor [MVP-VB]
G6 Consulting
Toronto, Canada


"Joăo Santa Bárbara" <jo****@i24portugal.com> wrote in message
news:%2******************@TK2MSFTNGP09.phx.gbl...
hi all, i´m noobie in .Net, and i need to know how to work with the cargabe collector.

as an example
i have a button´s click event
with this code ..

private sub Button_EventClick (.....)
Dim frm as New frmForm ()
Frm.MdiParent = me
frm.show
end sub

after that, when do i call the garbage colector ?? if i don´t have access to the form ?
my problem is that i have an aplication that comsumes lots of memory
i need todo some procedures to get more free memory.

thks
JSB

Nov 22 '05 #2
You don't need to call the garbage collector explicitly, it runs
automatically when your application needs to free up some memory. Check out
this article for more information on how the garbage collection system
works.

http://www.ftponline.com/vsm/2002_12...a/default.aspx

--
Rob Windsor [MVP-VB]
G6 Consulting
Toronto, Canada


"Joăo Santa Bárbara" <jo****@i24portugal.com> wrote in message
news:%2******************@TK2MSFTNGP09.phx.gbl...
hi all, i´m noobie in .Net, and i need to know how to work with the cargabe collector.

as an example
i have a button´s click event
with this code ..

private sub Button_EventClick (.....)
Dim frm as New frmForm ()
Frm.MdiParent = me
frm.show
end sub

after that, when do i call the garbage colector ?? if i don´t have access to the form ?
my problem is that i have an aplication that comsumes lots of memory
i need todo some procedures to get more free memory.

thks
JSB

Nov 22 '05 #3

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

Similar topics

3
by: Martin Drautzburg | last post by:
Just for curiosity: does python use a mark-and-sweep garbage collector or simple reference counting? In the latter case it would not garbage collect circular references, right ? For...
1
by: Joăo Santa Bárbara | last post by:
hi all, i´m noobie in .Net, and i need to know how to work with the cargabe collector. as an example i have a button´s click event with this code .. private sub Button_EventClick (.....)...
28
by: joe | last post by:
I have a simple .NET application with two or three listViews which are filled with icons and when the user click on the proper item, they display the related images. I use "image = null ; " for all...
10
by: pachanga | last post by:
The Hans-Boehm garbage collector can be successfully used with C and C++, but not yet a standard for C++.. Is there talks about Garbage Collector to become in the C++ standard?
1
by: MAHESH MANDHARE | last post by:
hi To all , I want to know about garbage collector & freeing memory of objects i have writened one sample program and in that i created one destructor something like this using System;...
10
by: Ray5531 | last post by:
Is there a way in C# to stop garbage collector from killing our object automatically.I'd like to kill it myself?? Is there away to to do so? Thanks
4
by: IcedCrow | last post by:
I know I read everywhere that you "can't" force the garbage collector to run, and that you really have no control when it runs. However as a programmer I know that there is always a way around...
13
by: Mingnan G. | last post by:
Hello everyone. I have written a garbage collector for standard C++ application. It has following main features. 1) Deterministic Finalization Providing deterministic finalization, the system...
51
by: Tony Sinclair | last post by:
I'm just learning C#. I'm writing a program (using Visual C# 2005 on WinXP) to combine several files into one (HKSplit is a popular freeware program that does this, but it requires all input and...
3
by: O.B. | last post by:
I'm a little unfamiliar with how the garbage collector works in C#. First my example: public unsafe struct TestClass { fixed byte buffer; TestA testA;
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$) { } ...
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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.