Click here to Skip to main content
15,914,109 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
Questionwindows service which monitors listening ports... Pin
routhu rao11-Mar-08 18:56
routhu rao11-Mar-08 18:56 
Generaluppercase encoding name with XMLTextWriter Pin
Uwe Ryssel11-Mar-08 10:38
Uwe Ryssel11-Mar-08 10:38 
GeneralTextbox scrolling problem Pin
TheIdleProgrammer11-Mar-08 5:27
TheIdleProgrammer11-Mar-08 5:27 
GeneralRe: Textbox scrolling problem Pin
Christian Graus11-Mar-08 10:59
protectorChristian Graus11-Mar-08 10:59 
GeneralRe: Textbox scrolling problem Pin
TheIdleProgrammer12-Mar-08 0:42
TheIdleProgrammer12-Mar-08 0:42 
GeneralRe: Textbox scrolling problem Pin
TheIdleProgrammer12-Mar-08 1:31
TheIdleProgrammer12-Mar-08 1:31 
GeneralGarbage Collector Pin
Het210910-Mar-08 13:11
Het210910-Mar-08 13:11 
GeneralRe: Garbage Collector Pin
Scott Dorman10-Mar-08 16:00
professionalScott Dorman10-Mar-08 16:00 
Het2109 wrote:
it is good to call GC.Collect to free up the memory.


It's almost never a good idea to call GC.Collect directly. Just because you are using Interop, it will depend on what you are doing. If you are directly allocating memory or translating structures to pointers (or back again) using any of the methods on the Marshal class then you need to be very careful about allocating and deallocating memory using the appropriate methods on the Marshal class.

Het2109 wrote:
What are the other scenarios when we should use Garbage Collector ?


Any time you are writing managed code you're using the garbage collector. If the class you are using implements the IDisposable interface (or provides a Dispose method) you should call Dispose as soon as you can after you're done using that class. See this article[^] for more information.

Scott.

—In just two days, tomorrow will be yesterday.
—Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai

[Forum Guidelines] [Articles] [Blog]

GeneralRe: Garbage Collector Pin
Het210910-Mar-08 16:29
Het210910-Mar-08 16:29 
GeneralRe: Garbage Collector Pin
Scott Dorman10-Mar-08 16:30
professionalScott Dorman10-Mar-08 16:30 
GeneralRe: Garbage Collector Pin
Mark Churchill12-Mar-08 1:20
Mark Churchill12-Mar-08 1:20 
Generalclass from database table Pin
seanwright10-Mar-08 6:59
seanwright10-Mar-08 6:59 
GeneralRe: class from database table Pin
led mike10-Mar-08 7:03
led mike10-Mar-08 7:03 
GeneralRe: class from database table Pin
Scott Dorman10-Mar-08 7:23
professionalScott Dorman10-Mar-08 7:23 
GeneralRe: class from database table Pin
seanwright10-Mar-08 7:28
seanwright10-Mar-08 7:28 
GeneralRe: class from database table Pin
Scott Dorman10-Mar-08 7:44
professionalScott Dorman10-Mar-08 7:44 
GeneralRe: class from database table Pin
Pete O'Hanlon10-Mar-08 10:32
mvePete O'Hanlon10-Mar-08 10:32 
GeneralRe: class from database table Pin
Mark Churchill12-Mar-08 0:47
Mark Churchill12-Mar-08 0:47 
GeneralConnected Vs. Disconnected Pin
CodingYoshi9-Mar-08 13:43
CodingYoshi9-Mar-08 13:43 
GeneralRe: Connected Vs. Disconnected Pin
Scott Dorman10-Mar-08 5:22
professionalScott Dorman10-Mar-08 5:22 
GeneralRe: Connected Vs. Disconnected Pin
Guffa11-Mar-08 8:11
Guffa11-Mar-08 8:11 
Generaloff right click in webform Pin
yogeshpan7-Mar-08 20:49
yogeshpan7-Mar-08 20:49 
GeneralWrong forum Pin
pmarfleet7-Mar-08 22:51
pmarfleet7-Mar-08 22:51 
General.NET 2.0 configuration Pin
usermans7-Mar-08 8:25
usermans7-Mar-08 8:25 
GeneralRe: .NET 2.0 configuration Pin
Paul Conrad7-Mar-08 15:20
professionalPaul Conrad7-Mar-08 15:20 

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.