Click here to Skip to main content
15,889,116 members
Home / Discussions / C#
   

C#

 
GeneralRe: yield return Pin
George_George2-May-08 21:24
George_George2-May-08 21:24 
Question1-Wire iButtons [modified] Pin
MarkB7771-May-08 3:32
MarkB7771-May-08 3:32 
QuestionFinalization and Performance Pin
George_George1-May-08 3:20
George_George1-May-08 3:20 
AnswerRe: Finalization and Performance Pin
Christian Graus1-May-08 3:34
protectorChristian Graus1-May-08 3:34 
GeneralRe: Finalization and Performance Pin
George_George1-May-08 3:47
George_George1-May-08 3:47 
GeneralRe: Finalization and Performance Pin
Christian Graus1-May-08 3:56
protectorChristian Graus1-May-08 3:56 
GeneralRe: Finalization and Performance Pin
George_George1-May-08 4:10
George_George1-May-08 4:10 
GeneralRe: Finalization and Performance Pin
N a v a n e e t h1-May-08 6:07
N a v a n e e t h1-May-08 6:07 
George_George wrote:
You mean in GC, if gen2 collection is decided to run, then gen2 collection has to wait for gen1 collection complete, and gen1 has to wait for gen0 collection complete?


Objects that are just allocated will be on gen0. Objects survived one cycle of GC will be in gen1 and all other will be in gen2. When GC collects memory, it initially collects gen0, if enough memory is not claimed it will go to gen1 and then to gen2.

All objects considered as garbage and don't have finalizers will be removed immediately. If finalizer is available, then it won't be removed immediately. GC will flag it and start calling it's finalize method in another thread. So it will be reclaimed in next cycle. This is why classes which have finalizers are performance costly.

George_George wrote:
GC could only decide to run gen0 only, or gen1 + gen0, right?


I am not getting your point here. Can you explain it ?

All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia

How to use google | Ask smart questions

GeneralRe: Finalization and Performance Pin
George_George1-May-08 21:19
George_George1-May-08 21:19 
GeneralRe: Finalization and Performance Pin
N a v a n e e t h1-May-08 22:59
N a v a n e e t h1-May-08 22:59 
GeneralRe: Finalization and Performance Pin
George_George2-May-08 2:43
George_George2-May-08 2:43 
AnswerRe: Finalization and Performance PinPopular
Mike Dimmick1-May-08 6:04
Mike Dimmick1-May-08 6:04 
GeneralRe: Finalization and Performance Pin
N a v a n e e t h1-May-08 6:41
N a v a n e e t h1-May-08 6:41 
GeneralRe: Finalization and Performance Pin
Guffa1-May-08 9:29
Guffa1-May-08 9:29 
GeneralRe: Finalization and Performance Pin
George_George1-May-08 21:27
George_George1-May-08 21:27 
GeneralRe: Finalization and Performance Pin
N a v a n e e t h1-May-08 23:06
N a v a n e e t h1-May-08 23:06 
GeneralRe: Finalization and Performance Pin
George_George2-May-08 2:44
George_George2-May-08 2:44 
GeneralRe: Finalization and Performance Pin
Guffa2-May-08 1:54
Guffa2-May-08 1:54 
GeneralRe: Finalization and Performance Pin
N a v a n e e t h2-May-08 2:35
N a v a n e e t h2-May-08 2:35 
GeneralRe: Finalization and Performance Pin
Guffa2-May-08 17:42
Guffa2-May-08 17:42 
GeneralRe: Finalization and Performance Pin
N a v a n e e t h2-May-08 20:35
N a v a n e e t h2-May-08 20:35 
GeneralRe: Finalization and Performance Pin
George_George2-May-08 2:47
George_George2-May-08 2:47 
GeneralRe: Finalization and Performance Pin
N a v a n e e t h1-May-08 23:08
N a v a n e e t h1-May-08 23:08 
GeneralRe: Finalization and Performance Pin
Guffa2-May-08 1:57
Guffa2-May-08 1:57 
GeneralRe: Finalization and Performance Pin
George_George1-May-08 21:28
George_George1-May-08 21:28 

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.