Postby RobertG » Wed May 07, 2008 4:08 pm
I am having problems with GDI leaks,
I am statically loading the OCX file. so that I can use it as many times I would like during app life time, I also do a FPC_LoadOCXCodeFromMemory once... I have even tested to load/unload the ocx between each movie... However the problem seem to be connected with creating a window and destroying the window.
For some wierd reason after a destruction of a window wich works visually fine, it still allocates more GDI objects???? this is a wierd behaviour. After running my app which shows several movies after 24 h or so.. My GDI objects are up to 9999 and then windows behaves wierdly aswell. I have no other memory leaks, no thread leaks, and now I don't even grabb the textures i let the flash player do its job on this window, I have localized the problem solely to the creation and destruction of the windows.
I Use the FPC_CreateWindows...
_hwndFlashCtrl = FPC_CreateWindow(m_hFPC,
0,
NULL,
WS_POPUP|WS_VISIBLE,
rw,
0,
_renderWidth,
_renderHeight,
/*parentHWND*/ NULL,
NULL,
NULL,
NULL);
And once the movie is finnished playing I'll do Ò‘
DestroyWindow(_hwndFlashCtrl)
Visually everything works properly except for the GDI objects are still growing in numbers?
I am within the same thread for the constructing and destroying the windows?? I am lost, this doesn't make any sense?
Even tried to unload the movie as stated above but with no difference in behaviour.
Br Robert.