July 2015
Intermediate to advanced
1300 pages
87h 27m
English
Implementing Dispose and Finalize cannot necessarily be required. It depends only on what kind of work your objects perform. Table 8.1 summarizes what and when you should implement.
TABLE 8.1 Implementing Destructors
You already have seen examples about Finalize and Dispose, so here you get an example of their combination. Before you see the code, you have to know that you will see invocations to Win32 unmanaged APIs that you do not need in real applications, but these kinds of functions are useful to understand to know how to release unmanaged resources. Now take a look at Listing 8.2.
LISTING 8.2 Implementing ...