I was fairly sure that I had read (in Richter’s C# book) that objects that implement IDisposable and/or which have a Finalizer live until Generation 2. However, I can’t find the reference, and my test application doesn’t seem to support my belief.
Can anyone else confirm/deny?
They certainly survive to Gen 1 since they are placed on a queue for the finalizer to get round to them. However if the finalizer gets to them before a Gen 1 collection they won’t survive to Gen 2.
I haven’t got that book for comparison but are you sure your not confusing this with items on the large object heap? The large object heap is only collected on a Gen 2 collection.