- Timestamp:
- Jun 11, 2001, 4:37:46 PM (24 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/gen_object.cpp
r5951 r5964 1 /* $Id: gen_object.cpp,v 1.1 0 2001-06-10 12:05:38sandervl Exp $ */1 /* $Id: gen_object.cpp,v 1.11 2001-06-11 14:37:46 sandervl Exp $ */ 2 2 /* 3 3 * Generic Object Class for OS/2 … … 91 91 LONG GenericObject::addRef() 92 92 { 93 //// dprintf(("addRef %x -> refcount %x", this, refCount));93 dprintf2(("addRef %x -> refcount %x", this, refCount+1)); 94 94 return InterlockedIncrement(&refCount); 95 95 } … … 99 99 LONG GenericObject::release() 100 100 { 101 //// dprintf(("release %x -> refcount %x", this, refCount));101 dprintf2(("release %x -> refcount %x", this, refCount-1)); 102 102 #ifdef DEBUG 103 103 if(refCount-1 < 0) { … … 106 106 #endif 107 107 if(InterlockedDecrement(&refCount) == 0 && fDeletePending) { 108 dprintf2(("marked for deletion -> delete now")); 108 109 delete this; 109 110 return 0; -
trunk/src/user32/win32wbase.cpp
r5951 r5964 1 /* $Id: win32wbase.cpp,v 1.26 2 2001-06-10 12:05:40sandervl Exp $ */1 /* $Id: win32wbase.cpp,v 1.263 2001-06-11 14:37:46 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 203 203 setParent(NULL); //or else we'll crash in the dtor of the ChildWindow class 204 204 } 205 205 else 206 if(getParent() && getParent()->getFirstChild() == this && getNextChild() == NULL) 207 { 208 //if we're the last child that's being destroyed and our 209 //parent window was also destroyed, then we 210 if(getParent()->IsWindowDestroyed()) 211 { 212 setParent(NULL); //or else we'll crash in the dtor of the ChildWindow class 213 } 214 } 206 215 /* Decrement class window counter */ 207 216 if(windowClass) { … … 238 247 } 239 248 Win32BaseWindow *wndparent = (Win32BaseWindow *)ChildWindow::getParentOfChild(); 240 if(wndparent ) {249 if(wndparent && !fDestroyAll) { 241 250 RELEASE_WNDOBJ(wndparent); 242 251 } 243 if(owner ) {252 if(owner && !fDestroyAll) { 244 253 RELEASE_WNDOBJ(owner); 245 254 } … … 427 436 else 428 437 { 429 owner = GetWindowFromHandle(GetWindowFromHandle(cs->hwndParent)->GetTopParent()); 438 Win32BaseWindow *wndparent = GetWindowFromHandle(cs->hwndParent); 439 if(wndparent) { 440 owner = GetWindowFromHandle(wndparent->GetTopParent()); 441 RELEASE_WNDOBJ(wndparent); 442 } 443 else owner = NULL; 444 430 445 if(owner == NULL) 431 446 {
Note:
See TracChangeset
for help on using the changeset viewer.