c# - Why does GC put objects in finalization queue? -
as understand, garbage collector in c# put objects of class finalization queue, implement destructor of class. when reading documentation gc.suppresfinalize, mentions object header has bit set calling finalize.
i wondering why implementers of gc had put objects in queue, , delay freeup of memory 1-2 cycles. not @ bit flag while releasing memory, call finalize of object , release memory?
no doubt idiot , not able understand working of gc. posing question improve understanding or fill missing gap in knowledge
edit : if bit flag suppressfinalize, gc implementers have added flag in object header purpose, no?
so can run in different thread , keep blocking main gc thread.
you can learn lot gc msdn article.
Comments
Post a Comment