News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Memory leak with BitmapFromPicture

Started by Faiseur, June 15, 2005, 04:51:21 PM

Previous topic - Next topic

Faiseur

Hello,

This library is used by BitmapFromResource, BitmapFromFile and BitmapFromMemory.


BitmapFromPicture does not release the dc called by GetDC:


    invoke GetDC, NULL          ; screen DC


To correct I added, to end procedure:


invoke ReleaseDC,NULL,compDC ; <-- added
mov eax, tempBitmap     ; the bitmap handle is the return value
ret   



Regards,

Faiseur




French asm Forum: http://www.asmforum.net/   Website: http://www.faiseur.net/

QvasiModo

That bug is actually older than this forum :eek I wonder what's it still doing there.

hutch--

Its waiting for its author to fix it, I did not write it.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

Vortex

Hi Faiseur,

Thanks for informing us about the bug. I am using Ernie's library.