Click here to Skip to main content
15,884,388 members
Home / Discussions / C#
   

C#

 
AnswerRe: Garbage Collection in C#. Pin
CPallini5-Apr-09 23:47
mveCPallini5-Apr-09 23:47 
AnswerRe: Garbage Collection in C#. [modified] Pin
akhilonly0075-Apr-09 23:47
akhilonly0075-Apr-09 23:47 
GeneralRe: Garbage Collection in C#. Pin
Colin Angus Mackay5-Apr-09 23:50
Colin Angus Mackay5-Apr-09 23:50 
GeneralRe: Garbage Collection in C#. Pin
akhilonly0076-Apr-09 0:04
akhilonly0076-Apr-09 0:04 
GeneralRe: Garbage Collection in C#. Pin
Colin Angus Mackay6-Apr-09 0:16
Colin Angus Mackay6-Apr-09 0:16 
GeneralRe: Garbage Collection in C#. Pin
DaveyM696-Apr-09 0:16
professionalDaveyM696-Apr-09 0:16 
GeneralRe: Garbage Collection in C#. Pin
akhilonly0076-Apr-09 0:31
akhilonly0076-Apr-09 0:31 
AnswerRe: Garbage Collection in C#. Pin
Colin Angus Mackay5-Apr-09 23:48
Colin Angus Mackay5-Apr-09 23:48 
Ashwani Dhiman wrote:
After how much time later the garbage collector is called automatically to recycle the objects?


When it needs to, or when you ask it (but even then it may not).


Ashwani Dhiman wrote:
How the garbage collector Knows to which object has to be recycled in the memory?


When garbage collection is run it maps all objects in the system. Any that are not referenced somewhere down the object graph from a known root are discarded. Root objects are those that are statically declared.


Ashwani Dhiman wrote:
And where we have to Call the garbage collector?


You don't. It happens when it needs to.


Ashwani Dhiman wrote:
If i have write a code of 500 lines and define a object in the starting and use the object in second last line of the code. Is the garbage collector recycle the object before its use or not.


If it needs to then yes. Otherwise then no.


GeneralRe: Garbage Collection in C#. Pin
S. Senthil Kumar6-Apr-09 5:22
S. Senthil Kumar6-Apr-09 5:22 
AnswerMessage Removed Pin
6-Apr-09 3:35
professionalN_tro_P6-Apr-09 3:35 
GeneralRe: Garbage Collection in C#. Pin
Colin Angus Mackay6-Apr-09 5:00
Colin Angus Mackay6-Apr-09 5:00 
GeneralRe: Garbage Collection in C#. Pin
led mike6-Apr-09 5:15
led mike6-Apr-09 5:15 
GeneralRe: Garbage Collection in C#. Pin
Dan Neely6-Apr-09 9:05
Dan Neely6-Apr-09 9:05 
GeneralRe: Garbage Collection in C#. Pin
Colin Angus Mackay6-Apr-09 9:07
Colin Angus Mackay6-Apr-09 9:07 
GeneralRe: Garbage Collection in C#. Pin
Dan Neely6-Apr-09 9:37
Dan Neely6-Apr-09 9:37 
GeneralRe: Garbage Collection in C#. Pin
Dan Neely7-Apr-09 7:05
Dan Neely7-Apr-09 7:05 
QuestionSend struct from c# as reference to c++ dll Pin
Ronenb5-Apr-09 23:15
Ronenb5-Apr-09 23:15 
AnswerRe: Send struct from c# as reference to c++ dll Pin
CPallini5-Apr-09 23:44
mveCPallini5-Apr-09 23:44 
QuestionC# + Webpage, questions Pin
Yinfall5-Apr-09 23:14
Yinfall5-Apr-09 23:14 
AnswerRe: C# + Webpage, questions Pin
Colin Angus Mackay5-Apr-09 23:19
Colin Angus Mackay5-Apr-09 23:19 
GeneralRe: C# + Webpage, questions Pin
Yinfall5-Apr-09 23:43
Yinfall5-Apr-09 23:43 
GeneralRe: C# + Webpage, questions Pin
Colin Angus Mackay6-Apr-09 0:18
Colin Angus Mackay6-Apr-09 0:18 
JokeRe: C# + Webpage, questions Pin
Yinfall6-Apr-09 0:26
Yinfall6-Apr-09 0:26 
QuestionEnable/Disable DataGridViewCell Pin
half-life5-Apr-09 23:09
half-life5-Apr-09 23:09 
AnswerRe: Enable/Disable DataGridViewCell Pin
Michael Bookatz5-Apr-09 23:38
Michael Bookatz5-Apr-09 23:38 

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.