Changeset 48
- Timestamp:
- 03/04/08 18:04:23 (7 months ago)
- Files:
-
- trunk/win32/dfl/control.d (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/win32/dfl/control.d
r42 r48 5946 5946 5947 5947 5948 /// 5949 void dispose() 5950 { 5951 dispose(true); 5952 } 5953 5954 /// ditto 5955 protected void dispose(bool disposing) 5956 { 5957 if(disposing) 5958 { 5959 killing = true; 5960 5961 cmenu = cmenu.init; 5962 _ctrlname = _ctrlname.init; 5963 otag = otag.init; 5964 wcurs = wcurs.init; 5965 wfont = wfont.init; 5966 wparent = wparent.init; 5967 wregion = wregion.init; 5968 wtext = wtext.init; 5969 deleteThisBackgroundBrush(); 5970 //ccollection.children = null; // Not GC-safe in dtor. 5971 //ccollection = null; // ? Causes bad things. Leaving it will do just fine. 5972 } 5973 5974 if(!isHandleCreated) 5975 return; 5976 5977 destroyHandle(); 5978 /+ 5979 //assert(hwnd == HWND.init); // Zombie trips this. (Not anymore with the hwnd-prop) 5980 if(hwnd) 5981 { 5982 assert(!IsWindow(hwnd)); 5983 hwnd = HWND.init; 5984 } 5985 +/ 5986 assert(hwnd == HWND.init); 5987 5988 onDisposed(EventArgs.empty); 5989 } 5990 5991 5948 5992 protected: 5949 5993 … … 6347 6391 { 6348 6392 disposed(this, ea); 6349 }6350 6351 6352 ///6353 void dispose()6354 {6355 dispose(true);6356 }6357 6358 6359 ///6360 void dispose(bool disposing)6361 {6362 if(disposing)6363 {6364 killing = true;6365 6366 cmenu = cmenu.init;6367 _ctrlname = _ctrlname.init;6368 otag = otag.init;6369 wcurs = wcurs.init;6370 wfont = wfont.init;6371 wparent = wparent.init;6372 wregion = wregion.init;6373 wtext = wtext.init;6374 deleteThisBackgroundBrush();6375 //ccollection.children = null; // Not GC-safe in dtor.6376 //ccollection = null; // ? Causes bad things. Leaving it will do just fine.6377 }6378 6379 if(!isHandleCreated)6380 return;6381 6382 destroyHandle();6383 /+6384 //assert(hwnd == HWND.init); // Zombie trips this. (Not anymore with the hwnd-prop)6385 if(hwnd)6386 {6387 assert(!IsWindow(hwnd));6388 hwnd = HWND.init;6389 }6390 +/6391 assert(hwnd == HWND.init);6392 6393 onDisposed(EventArgs.empty);6394 6393 } 6395 6394
