GC Types
Last updated
Was this helpful?
Last updated
Was this helpful?
COM for example had AddRef and Release cals for objects
When count hits zero => object can be freed
Problems with circular references
Mark phase - identify objects that are still in use
Sweep phase - remove unused objects
Compact phase - compact the memory
We follow references from root set. If two objects are referencing each other, but non of them is referenced by root set => these objects will not be marked as actually used (this is how cycle problem is solved).
Uses different spaces
to manage memory. It also has Mark and Sweep phases.
Maintain different generations for memory. Long living objects promoted to a different generation.