[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-devel
Subject: Re: Add missing FreeLibrary calls
From: Alexandre Julliard <julliard () winehq ! org>
Date: 2005-11-30 11:11:28
Message-ID: 8764qa5r1b.fsf () wine ! dyndns ! org
[Download RAW message or body]
James Hawkins <truiken@gmail.com> writes:
> Index: dlls/gdi/tests/gdiobj.c
> ===================================================================
> RCS file: /home/wine/wine/dlls/gdi/tests/gdiobj.c,v
> retrieving revision 1.10
> diff -u -p -r1.10 gdiobj.c
> --- dlls/gdi/tests/gdiobj.c 26 Oct 2005 10:10:23 -0000 1.10
> +++ dlls/gdi/tests/gdiobj.c 29 Nov 2005 04:25:18 -0000
> @@ -274,9 +274,13 @@ static void test_GdiGetCharDimensions(vo
> LONG ret;
> SIZE size;
> LONG avgwidth, height;
> + HMODULE hGDI;
> static const char szAlphabet[] = \
> "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; typedef LONG (WINAPI \
> *fnGdiGetCharDimensions)(HDC hdc, LPTEXTMETRICW lptm, LONG \
> *height);
> - fnGdiGetCharDimensions GdiGetCharDimensions = \
> (fnGdiGetCharDimensions)GetProcAddress(LoadLibrary("gdi32"), \
> "GdiGetCharDimensions"); + fnGdiGetCharDimensions GdiGetCharDimensions;
> + hGDI = LoadLibrary("gdi32");
> + GdiGetCharDimensions = (fnGdiGetCharDimensions)GetProcAddress(hGDI, \
> "GdiGetCharDimensions"); + FreeLibrary(hGDI);
You can't free libraries that will be called later on. And there's no
reason to free anything in tests, everything is freed on exit anyway.
--
Alexandre Julliard
julliard@winehq.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic