Under what circumstances, we need to call GC.Collect twice

Sounds like you have something with a finalizer, basically – if you only call GC.Collect() once, the finalizers are finishing but the finalized objects aren’t being collected.

Whether or not that represents a bug is a different matter. Generally it’s not a good idea for there to be finalizers which actually need to be executing, but maybe it’s okay in your case.

Leave a Comment