Skip to Main Content
Visual Basic 2015 Unleashed
book

Visual Basic 2015 Unleashed

by Alessandro Del Sole
July 2015
Intermediate to advanced content levelIntermediate to advanced
1300 pages
87h 27m
English
Sams
Content preview from Visual Basic 2015 Unleashed

Understanding Dispose and the IDisposable Interface

One of the issues of the Finalize destructor is that you cannot determine whether resources will be freed up and when an object will be physically destroyed from memory. This is because of the nondeterministic nature of the garbage collector—unused references will still remain in memory until the garbage collector kicks in, which is not a good idea. A better approach is to provide clients the ability to immediately release resources (such as network connections, data connections, or system resources) just before the object is destroyed, setting it to Nothing. The .NET Framework provides a way for releasing resources immediately and under your control, which is the Dispose method. Implementing ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning Visual Basic 2015

Beginning Visual Basic 2015

Bryan Newsome

Publisher Resources

ISBN: 9780134196664Purchase book