Hello,
I have the following situation (pseudocode):
hglrc1 = wglCreateContext(hdc1)
wglMakeCurrent(hdc1,hglrc1)
hglrc2 = wglCreateContext(hdc2)
wglMakeCurrent(hdc2,hglrc2)
wglMakeCurrent(hdc3,hglrc2)
wglDeleteContext(hglrc1)
wglDeleteContext(hglrc2)
As a result of this sequence of calls, a WMesaFramebuffer structure is leaked.
The call causing the leak is wglMakeCurrent(hdc3,hglrc2). This is what I know
so far:
-> wglMakeCurrent(hdc3,hglrc2) calls
-> WMesaMakeCurrent(hglrc2,hdc3) which calls
-> wmesa_lookup_framebuffer(hdc3) which returns NULL, as the hdc given to
wglMakeCurrent is different from the one given at the time
of wglCreateContext
-> wmesa_new_framebuffer() is called and a new frame buffer is allocated
This new frame buffer is not released upon wglDeleteContext(hglrc2). As far as
I know, the device context passed to wglMakeCurrent does not have to
be the same
as the one passed to wglCreateContext as long as the the actual device and the
pixel formats are. Is this correct or is my usage wrong?
--
Dimitar Kodjabachev
|