473,487 Members | 2,667 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 1588
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
2434
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
255
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
3295
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
2005
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
1257
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
2270
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
13853
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
3770
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
3876
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
1355
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
7137
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,...
1
6846
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7349
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5442
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4874
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3071
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1381
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
600
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
267
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.