Divelements Community
Customer discussion of all Divelements products

Strange usage of GC Handles

Latest post 05-11-2007 9:50 by uncletom. 2 replies.
  • 04-26-2007 10:58

    Indifferent [:|] Strange usage of GC Handles

    Hi,

    we're developing an Application where we're using both SandBar (1.4.0.1) and SandDock (2.4.0.1).
    After user reports about increasing CPU-usage, i started monitoring the app with WinXP's Performance-Monitor.
    The .NET CLR Memory counter shows a constant increase of GC Handles.
    I found this was due to the fact that i'm rendering a custom Icon into a ContainerBar (Timer-based, every 500ms).
    After disabling the Timer, GC Handles stops increasing but i could see that moving the Mouse above a SandBar-Control also allocates new GC Handles.
    Moving the Mouse above a DockableWindow (SandDock) also generates new GC Handles.
    I left the app alone over night, the next morning GC Handles were above 270000 and CPU-usage was at 20%.

    Do you have an explanation for that ?


    I've attached a sample-application which shows the described behavior.
  • 05-08-2007 15:38 In reply to

    Re: Strange usage of GC Handles

    We do everything normally with regards to cleanup of resources that need to be disposed. Other resources are collected by the GC, which is often delayed as cleanup and subsequent defragmentation of memory is expensive. When you broke into the debugger when your application was running at 20% of the CPU, did you notice what it was doing?

    There are many extensive articles on how the GC operates, including what can be regarded as normal and what cannot. I do not believe there is anything we could be doing any better in our products with regard to cleanup.
  • 05-11-2007 9:50 In reply to

    Re: Strange usage of GC Handles

    Thanks for the answer.
    I tried several times to break into the Debugger while the App was running, but every time i ended in Main.
    I'm out of ideas on how to narrow down this problem further, maybe it's an issue of the .NET Framework or GDI.

Page 1 of 1 (3 items) | RSS
Copyright © 2008 Divelements Limited
Powered by Community Server (Commercial Edition), by Telligent Systems