Yahoo Messenger Emoticons Leak Like a Sieve

My Windows XP desktop system often feels ill.

I used to be a Win32 programmer, so today I tracked down the reason why …

Each time Yahoo Messenger initially displays an emoticon image, it allocates from 2 GDI objects (original icons) to 51 GDI objects (the new “busy on the phone icon”) until the windows are closed, in which case about half the objects get released.

Each of the icons is color and animated, so each should take the same number of resources.

Over time, those leaks add up …

In my case, YM starts with 638 GDI objects and grows to over 10,000 GDI objects, handles and User objects each. A Windows program is considered to be broken if it uses more than 2,000 of any of those. 10,000 objects is more than the other 32 processes on my system combined.

Messenger Team … you can duplicate this by:

  1. load Windows Task Manager and click on Processes Tab … View … Select Columns … Select Memory Usage, USER Objects, Handle Count, GDI Objects
  2. sort by GDI objects
  3. then load Yahoo Messenger and open a buddy window
  4. click on each emoticon, press Enter and watch the GDI Objects count climb.

Oh ya, and why does YM need 45 MB RAM to open 2 chat windows?

Tested on Yahoo Messenger versions 7.0.0.437, 8.1.0.195 and 8.1.0.249.

3 Responses to “Yahoo Messenger Emoticons Leak Like a Sieve”

  1. calin says:

    Yeah I have the same problem and what can I say… They simply sucks and I don’t understand those programmers … :( (

  2. Very interesting indeed – thank you for that, James.
    (I found this page – among others – while searching for understanding on MY YM woes ;-) )

    I don’t understand programming in depth (I DID 40 years ago, but seems a few things have changed since then!) – but I’ve found a similar(?) phenomenon with Handles (whatever they are!!).

    When I first load YM Task Manager may show it with about 1500 handles – there’s usually also one SvcHost with about 1500 too, but no other processes over about 500.
    But it seems that as time goes by YM increases this – sometimes up to 5000 or 6000 – at which time usually it (or other things) begin misbehaving, so I exit YM then restart it.
    Sounds similar to your “10000 GDI objects” scenario!

    I wish I understood such things more, then perhaps I could adapt my style to avoid, or cope with, such dumb programming. :-(

  3. KC says:

    I came here looking for an answer to the handle leak and may have found atleast one scenario – when a message window is minimized(or in the background) and a message arrives and it starts blinking, I have noticed an initial jump of 4 handles followed by 2 Handles foe every blinkgin…this is the ONLY process which consumes so many HANDLES.