Click here to Skip to main content
15,905,028 members
Home / Discussions / C#
   

C#

 
GeneralRe: Finalizer implementation Pin
George_George22-Apr-08 17:47
George_George22-Apr-08 17:47 
GeneralRe: Finalizer implementation Pin
Scott Dorman23-Apr-08 2:15
professionalScott Dorman23-Apr-08 2:15 
GeneralRe: Finalizer implementation Pin
George_George23-Apr-08 2:49
George_George23-Apr-08 2:49 
Generalroot in managed heap Pin
George_George19-Apr-08 21:01
George_George19-Apr-08 21:01 
GeneralRe: root in managed heap Pin
Gareth H19-Apr-08 23:15
Gareth H19-Apr-08 23:15 
GeneralRe: root in managed heap Pin
George_George19-Apr-08 23:21
George_George19-Apr-08 23:21 
GeneralRe: root in managed heap Pin
Jordanwb20-Apr-08 4:06
Jordanwb20-Apr-08 4:06 
GeneralRe: root in managed heap Pin
Luc Pattyn20-Apr-08 2:37
sitebuilderLuc Pattyn20-Apr-08 2:37 
Hi George,

these are all starting points when a GC scans for reachable objects:
- the root of the heap (or every heap if there are many holding managed objects)
- the current stack pointer for every thread in the process
- the CPU registers (holding data for the current thread, unless the GC itself is
running in a thread, so the current thread does not belong to the process of interest)

From each of these everything that could be a reference needs to be followed, just like
a web crawler would do when you give it one or more URLs.

Every object that one does not find with the above is declared dead and can be collected;
doing it this way avoids any problems with cyclic references (A holds ref to B, and B holds
ref to A; both are dead if the above algorithm never leads to either A or B).

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.


GeneralRe: root in managed heap Pin
George_George20-Apr-08 3:16
George_George20-Apr-08 3:16 
GeneralRe: root in managed heap Pin
Luc Pattyn20-Apr-08 3:38
sitebuilderLuc Pattyn20-Apr-08 3:38 
GeneralRe: root in managed heap Pin
George_George20-Apr-08 4:42
George_George20-Apr-08 4:42 
GeneralRe: root in managed heap Pin
Luc Pattyn20-Apr-08 13:03
sitebuilderLuc Pattyn20-Apr-08 13:03 
GeneralRe: root in managed heap Pin
George_George20-Apr-08 19:20
George_George20-Apr-08 19:20 
GeneralRe: root in managed heap Pin
Luc Pattyn20-Apr-08 22:42
sitebuilderLuc Pattyn20-Apr-08 22:42 
GeneralRe: root in managed heap Pin
George_George20-Apr-08 23:46
George_George20-Apr-08 23:46 
GeneralRe: root in managed heap Pin
Luc Pattyn21-Apr-08 0:32
sitebuilderLuc Pattyn21-Apr-08 0:32 
GeneralRe: root in managed heap Pin
George_George21-Apr-08 1:08
George_George21-Apr-08 1:08 
GeneralRe: root in managed heap Pin
Luc Pattyn21-Apr-08 1:23
sitebuilderLuc Pattyn21-Apr-08 1:23 
GeneralRe: root in managed heap Pin
George_George21-Apr-08 2:04
George_George21-Apr-08 2:04 
GeneralRe: root in managed heap Pin
Luc Pattyn21-Apr-08 4:00
sitebuilderLuc Pattyn21-Apr-08 4:00 
GeneralRe: root in managed heap Pin
George_George21-Apr-08 4:16
George_George21-Apr-08 4:16 
GeneralFileStream.Read(); Pin
Ian Uy19-Apr-08 18:33
Ian Uy19-Apr-08 18:33 
GeneralRe: FileStream.Read(); Pin
Zoltan Balazs20-Apr-08 0:11
Zoltan Balazs20-Apr-08 0:11 
GeneralRe: FileStream.Read(); Pin
Ian Uy20-Apr-08 1:14
Ian Uy20-Apr-08 1:14 
GeneralComboBox not properly adding items Pin
Jordanwb19-Apr-08 14:10
Jordanwb19-Apr-08 14:10 

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.