Transfered the window struct memory release from WIN_DestroyWindow to

WIN_ReleaseWndPtr.
This commit is contained in:
Francois Boisvert 1999-04-03 11:13:33 +00:00 committed by Alexandre Julliard
parent 96d0359a09
commit 86e2e11137
1 changed files with 5 additions and 3 deletions

View File

@ -193,9 +193,11 @@ void WIN_ReleaseWndPtr(WND *wndPtr)
/*Decrement destruction monitoring value*/
wndPtr->irefCount--;
/* Check if it's time to release the memory*/
if(wndPtr->irefCount == 0)
/* Check if it's time to release the memory*/
if(wndPtr->irefCount == 0 && !wndPtr->dwMagic)
{
/*Add memory releasing code here*/
/* Release memory */
USER_HEAP_FREE( wndPtr->hwndSelf);
}
else if(wndPtr->irefCount < 0)
{
@ -530,7 +532,7 @@ static WND* WIN_DestroyWindow( WND* wndPtr )
WIN_UpdateWndPtr(&pWnd,wndPtr->next);
wndPtr->pDriver->pFinalize(wndPtr);
USER_HEAP_FREE( hwnd );
return pWnd;
}