[OS] WinXP SP3
I have a memory leak when I’m combining SDL_CreateRGBSurface with CreateDIBSection functions.
Specifically I create a 32bit RGB surface and I’m passing it’s pixels pointer as a ‘hSection’ parameter od CreateDIBSection function.
I experimented on using some random void *data; to pass as a ‘hSection’ and then the memory gets released nicely.
So the problem is that SDL_CreateSurface and CreateDIBSection are both allocating memory at the same place but only one of it gets released.
I’m using this code to draw on win32 hwnd’s and I’ts based on Tom Wilson’s SDLToWin32 example found here http://www.polplex.co.uk/~tigger/sdl/
The code in question is in the SDLToWindows::createSurface function.
Is there anyway I can overide that double allocation?
ELMA Kurtalj d.o.o. (ELMA Kurtalj ltd.)
Vitezi?eva 1a, 10000 Zagreb, Hrvatska (Viteziceva 1a, 10000 Zagreb, Croatia)
Tel: 01/3035555, Faks: 01/3035599 (Tel: ++385-1-3035555, Fax: ++385-1-3035599 )
elma at elma.hr (elma at elma.hr)
pitanje at elma.hr (questions at elma.hr)
primjedbe at elma.hr (complaints at elma.hr)
prodaja at elma.hr (sales at elma.hr)
servis at elma.hr (servicing at elma.hr)
shop at elma.hr (shop at elma.hr)
skladiste at elma.hr (warehouse at elma.hr)