Problem: GC Rooted in thread

Memory profiling for .NET developers

Problem: GC Rooted in thread

Postby Lycaon » Sat Nov 27, 2010 6:49 pm

First off, thanks to Red Gate for this app. It's just saved me so much headache I can't even begin to explain.

I've got a game server that's got a worker thread that processes incoming data, and after a client logs out, everything is cleaned up in .Dispose, but the profiler indicates that I still have the Client object GC rooted in the thread. A quick overview of the app:

Code: Select all
Sub IncomingQueueThread()

        Dim p As PendingPacket = m_Incoming.Dequeue ' This is a blocking queue which inherits the .NET Queue class
        ' p is processed here
    Loop Until m_Exit

End Sub

Class Client

End Class

Structure PendingPacket
    Public Client As Client, Packet As Packet
End Structure

I understand this isn't exactly a subject specific to the profiler, but I was hoping perhaps someone felt helpful enough to explain why it's tied up in the worker thread.

Thanks in advance.
Posts: 3
Joined: Sat Nov 27, 2010 6:36 pm

Postby ShortAngry » Fri Dec 10, 2010 11:52 am

Not sure what's going on here. Does it still stick around if you do a second garbage collection?
Posts: 13
Joined: Thu Dec 02, 2010 11:29 am

Return to ANTS Memory Profiler Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests