Changes between Version 9 and Version 10 of CodeBestPractices


Ignore:
Timestamp:
2011-12-10 13:50:00 (12 years ago)
Author:
jeroens
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CodeBestPractices

    v9 v10  
    1919 
    2020== Nasty experiences == 
    21  * Issue [http://sources.ecopath.org/trac/Ecopath/report/702 #702]: always override Dispose(bDisposing) to clean up controls, do not (smartly) use [wiki:OnHandleDestroyed !OnHandleDestroyed]. Note that the Visual Studio designer automagically places a Dispose method in its *.designer.vb files which is blocked from debugging. You may want to manually move this method to your main vb file and strip off the tags that prevent the debugger from stepping through the code. 
     21 * Always override Dispose(bDisposing) to clean up UI elements, do not use [wiki:OnHandleDestroyed !OnHandleDestroyed] because the .NET framework, which wraps Win32 controls, may call this method during the regular life span of a .NET control to do housekeeping. The call may be followed by ! OnHandleCreated - it's simply not a valid trigger to assume your control is dying.  
     22 * Note that the Visual Studio designer automagically places a Dispose method in its *.designer.vb files which is blocked from debugging. You may want to manually move this method to your main vb file and strip off ! DebuggerNonUserCode tags that prevent the debugger from stepping through the code.