Category: Programming/Other-Programming-Files
AutoMate
Download:
Operation System: Windows All License: Size: 7 KB Date: 2010-06-19 23:12:55
AutoMate was developed to be a tiny utility class to run a mate function automatically in code block.Getting clean-up code executed automatically using destructor of user-defined auto variable when it is getting out of its scope is a good technique since it increases readability as well as maintenance of code. Recently, I have been using HANDLE-related Win32 API functions a lot, and happened to realize that many of those functions are using only one clean-up function, CloseHandle. If you have blocks of code which are nested multiple times, and if you are returning from some of its execution path in its nesting sub-block after manipulating HANDLE, then calling CloseHandle() function in the right place to clean-up HANDLE is getting really messy and somewhat complicated.
www.cracksdata.com/get.php?id=266860
|