SKS
SKS

Reputation: 250

Which algorithm is used by Garbage Collector

In one of the interview, interviewer asked me the name of algorithm used by Garbage collection in .NET for memory cleanup. Can some one suggest me the name? Please not that i am aware of how it is done(managed code..GCRoots..Generations..etc).

Upvotes: 0

Views: 1758

Answers (1)

SKS
SKS

Reputation: 250

Thanks @Idos.

Name of algorithm is "mark-and-sweep algorithm". I guess this is what interviewer wanted to know. It is very well descirbed at: link

Upvotes: 1

Related Questions