Ignore:
Timestamp:
Jun 9, 2001, 4:50:26 PM (24 years ago)
Author:
sandervl
Message:

reference count (window + class objects) rewrite

File:
1 edited

Legend:

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

    r3663 r5935  
    1 /* $Id: win32wndchild.cpp,v 1.6 2000-06-07 21:45:52 sandervl Exp $ */
     1/* $Id: win32wndchild.cpp,v 1.7 2001-06-09 14:50:24 sandervl Exp $ */
    22/*
    33 * Win32 Child/Parent window class for OS/2
     
    1919//******************************************************************************
    2020//******************************************************************************
    21 ChildWindow::ChildWindow()
     21ChildWindow::ChildWindow(CRITICAL_SECTION *pLock)
    2222{
    23   parent           = 0;
    24   nextchild        = 0;
    25   children         = 0;
     23  parent     = 0;
     24  nextchild  = 0;
     25  children   = 0;
     26  pLockChild = pLock;
    2627}
    2728//******************************************************************************
     
    4748 ChildWindow *curchild;
    4849
    49    mutex.enter();
     50   Lock();
    5051
    5152   curchild = children;
     
    6162   child->setNextChild(NULL);
    6263
    63    mutex.leave();
     64   Unlock();
    6465   return TRUE;
    6566}
     
    7172 ChildWindow *curchild = children;
    7273
    73    mutex.enter();
     74   Lock();
    7475
    7576   if(curchild == child) {
     
    8081                dprintf(("ChildWindow::RemoveChild, children == NULL"));
    8182                DebugInt3();
    82                 mutex.leave();
     83                Unlock();
    8384                return FALSE;
    8485        }
     
    8889                        dprintf(("ChildWindow::RemoveChild, curchild == NULL"));
    8990                        DebugInt3();
    90                         mutex.leave();
     91                        Unlock();
    9192                        return FALSE;
    9293                }       
     
    9495        curchild->setNextChild(child->getNextChild());
    9596   }
    96    mutex.leave();
     97   Unlock();
    9798   return TRUE;
    9899}
Note: See TracChangeset for help on using the changeset viewer.