[cairo] win32 port leaks

Oleg Smolsky oleg.smolsky at pacific-simulators.co.nz
Sun Feb 20 15:46:25 PST 2005


Hi all,

as Hans Breuer mentioned this in
http://lists.freedesktop.org/archives/cairo/2005-February/003014.html

The current CVS version of cairo leaks GDI objects (bitmaps and DCs)
on win32. Below, are the descriptions of two bugs:

1) FAIL: cases of
      _create_dc_and_bitmap()
       _cairo_win32_surface_create_for_dc()
   as well as
      _cairo_win32_surface_destroy()

   need to invoke
        SelectObject(surface->dc, surface->old_bitmap);
        DeleteObject(surface->bitmap);

2) _cairo_win32_surface_destroy() needs to invoke
        DeleteDC(surface->dc);

   but only for contexts that were created with
   _create_dc_and_bitmap()

P.S. I could submit a patch that modifies struct _cairo_win32_surface
     in cairo-win32-private.h as well as a few functions and their
     arguments in cair_win32_surface.c
     
Best regards,
Oleg.




More information about the cairo mailing list