none
CLR Profiler Finalizer and RefCounted Node RRS feed

  • Question

  • I have a windows application, which on ceratin user actions create some forms just like a chat application where in one can open a chat window with buddy and close it whenever needed.  These window are bit heavier as copared to chat window, they have lots and lots of UI Controls and those are tightly coupled with other component of the product, backend all.

    I am getting System.OutOfMemoryException when my application is kept running for few hours and users does open and close window for aroudn 20/25 times. I was trying to debug the problem and I used CRL Profiler for analysing the Heap.

    In the heap graph shown for the applicaiton when I close the window, I can see some controls attached to "Finalizer" node and some of the are attached to "Hanlde, RefCounted" node.

    I want to know, the controls attached to "Finalizer" node are they ready for Garbage Collection( their finalize method is called and they will be garbage collected in the next GC cycle). Is it the correct assumption?

    What about the "Handle, RefCounted" node, what does this node signifies? And it shows count at something like 22/24, what does this count mean?

    Please can anybody tell me about these two type of node in the heap graph. I tried to search through the documentation but didn't find any use ful info there.

    I have the heap graphs's snap shot but I guess I cannot attach that file here. :(

    Saurabh Surana
    Tuesday, June 10, 2008 5:23 AM

Answers

  • Hi Saurabh,

    My knowledge of CLR profiler is quite superficial, but since nobody responded, I'll try to clarify some points.

    >I want to know, the controls attached to "Finalizer" node are they ready for Garbage Collection( their finalize method is >called and they will be garbage collected in the next GC cycle). Is it the correct assumption?

    All objects that have finalizers are placed in special finalization queue, then special finalizer thread performs calls of all finalizers, and only then these objects are ready for garbage collection and will be collected in next GC cycle.

    Vitaliy Liptchinsky
    • Marked as answer by Bruno Yu Monday, June 16, 2008 2:43 AM
    Wednesday, June 11, 2008 8:47 AM