Ignore:
Timestamp:
Feb 12, 2002, 7:07:21 PM (24 years ago)
Author:
sandervl
Message:

Fixed reference count leaks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/win32wbase.cpp

    r7801 r7890  
    1 /* $Id: win32wbase.cpp,v 1.313 2002-02-05 17:59:00 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.314 2002-02-12 18:07:20 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    279279        if(getParent()->IsWindowDestroyed())
    280280        {
     281            Win32BaseWindow *wndparent = (Win32BaseWindow *)ChildWindow::getParentOfChild();
     282            RELEASE_WNDOBJ(wndparent);
    281283            setParent(NULL);  //or else we'll crash in the dtor of the ChildWindow class
    282284        }
    283285    }
     286    else
     287    {
     288        Win32BaseWindow *wndparent = (Win32BaseWindow *)ChildWindow::getParentOfChild();
     289        if(wndparent && !fDestroyAll) {
     290            RELEASE_WNDOBJ(wndparent);
     291        }
     292    }
     293    if(owner && !fDestroyAll) {
     294        RELEASE_WNDOBJ(owner);
     295    }
     296
    284297    /* Decrement class window counter */
    285298    if(windowClass) {
     
    314327    if(propertyList) {
    315328        removeWindowProps();
    316     }
    317     Win32BaseWindow *wndparent = (Win32BaseWindow *)ChildWindow::getParentOfChild();
    318     if(wndparent && !fDestroyAll) {
    319         RELEASE_WNDOBJ(wndparent);
    320     }
    321     if(owner && !fDestroyAll) {
    322         RELEASE_WNDOBJ(owner);
    323329    }
    324330}
     
    957963    else {
    958964        //make sure no message can ever arrive for this window again (PM or from other win32 windows)
    959         dprintf(("Mark window %x (%x) as deleted", getWindowHandle(), this));
     965        dprintf(("Mark window %x (%x) as deleted; refcount %d", getWindowHandle(), this, getRefCount()));
    960966        markDeleted();
    961967        OSLibWinSetWindowULong(OS2Hwnd, OFFSET_WIN32WNDPTR, 0);
Note: See TracChangeset for help on using the changeset viewer.