Hi Folks, I'm trying to track down a memory leak in an application using ANTS profiler. I tracked it down to the Garbage collector where we have a list of objects System.Transactions.SafeIUnknown that sit there forever in the garbage collector, are in the finalizer queue but never get released.
I can find not documentation what so ever on the System.Transactions.SafeIUnknown nor can I determine what would create or reference this, it's nothing intentional on our part.
I am hoping someone out there may have some knowledge about this. It's a small leak of 20bytes but when our apps runs for days on end the leak builds up and we have millions of these waiting finalization and it starts to eat up lots and lots of memory.
Anyone any ideas where to go from here?
Follow-up
I've tracked it down to a particular library that is in use. It seems to get left behind after we execute any SQL statements through this particular library. The statemtements are not wrapped in transactions, but they are executed through a rather convuleted loop, of generic types and what currently looks like double-tripple indirection with delegates being passed around for sport and wrapped in closures which can be wrapped in more closures. I'll keep trying to tie it down exactly, my first port of call is to try and see if I can reproduce it using a similar mechanism.