Pro VB 2008 and the .NET 3.5 Platform [electronic resource] /
Troelsen, Andrew.author.
The point of this chapter was to demystify the garbage collection process. As you have seen, the garbage collector will only run when it is unable to acquire the necessary memory from the m- aged heap (or when a given AppDomain unloads from memory). When a garbage collection does occur, you can rest assured that Microsoft’s collection algorithm has been optimized by the use of object generations, secondary threads for the purpose of object finalization, and a managed heap dedicated to host large objects. This chapter also illustrated how to programmatically interact with the garbage collector using the System. GC class type. As mentioned, the only time when you will really need to do so is when you are building finalizable or disposable class types. Recall that finalizable types are classes that have overridden the virtual System. Object. Finalize() method to clean up unmanaged resources (at some time in the future). Disposable objects, on the other hand, are classes (or structures) that implement the IDisposable interface. Using this technique, you expose a public method to the object user that can be called to perform internal cleanup ASAP. Finally, you learned about an of- cial “disposal” pattern that blends both approaches. PART 3 Advanced VB Programming Constructs CHAPTER 9 Working with Interface Types This chapter builds on your current understanding of object-oriented development by examining the topic of interface-based programming.
Includes index.
Introducing Visual Basic 2008 and the .NET Platform -- The Philosophy of .NET -- Building Visual Basic 2008 Applications -- Core VB Programming Constructs -- VB 2008 Programming Constructs, Part I -- VB 2008 Programming Constructs, Part II -- Designing Encapsulated Class Types -- Understanding Inheritance and Polymorphism -- Understanding Structured Exception Handling -- Understanding Object Lifetime -- Advanced VB Programming Constructs -- Working with Interface Types -- Collections, Generics, and Nullable Data Types -- Delegates, Events, and Lambdas -- Operator Overloading and Custom Conversion Routines -- VB 2008-Specific Language Features -- An Introduction to LINQ -- Programming with .NET Assemblies -- Introducing .NET Assemblies -- Type Reflection, Late Binding, and Attribute-Based Programming -- Processes, AppDomains, and Object Contexts -- Building Multithreaded Applications -- .NET Interoperability Assemblies -- Introducing the .NET Base Class Libraries -- File and Directory Manipulation -- Introducing Object Serialization -- ADO.NET Part I: The Connected Layer -- ADO.NET Part II: The Disconnected Layer -- Programming with the LINQ APIs -- Introducing Windows Communication Foundation -- Introducing Windows Workflow Foundation -- Desktop Applications with Windows Forms -- Introducing Windows Forms -- Rendering Graphical Data with GDI+ -- Programming with Windows Forms Controls -- Desktop Applications with WPF -- Introducing Windows Presentation Foundation and XAML -- Programming with WPF Controls -- WPF 2D Graphical Rendering, Resources, and Themes -- Building Web Applications with ASP.NET -- Building ASP.NET Web Pages -- ASP.NET Web Controls, Themes, and Master Pages -- ASP.NET State Management Techniques.
The point of this chapter was to demystify the garbage collection process. As you have seen, the garbage collector will only run when it is unable to acquire the necessary memory from the m- aged heap (or when a given AppDomain unloads from memory). When a garbage collection does occur, you can rest assured that Microsoft’s collection algorithm has been optimized by the use of object generations, secondary threads for the purpose of object finalization, and a managed heap dedicated to host large objects. This chapter also illustrated how to programmatically interact with the garbage collector using the System. GC class type. As mentioned, the only time when you will really need to do so is when you are building finalizable or disposable class types. Recall that finalizable types are classes that have overridden the virtual System. Object. Finalize() method to clean up unmanaged resources (at some time in the future). Disposable objects, on the other hand, are classes (or structures) that implement the IDisposable interface. Using this technique, you expose a public method to the object user that can be called to perform internal cleanup ASAP. Finally, you learned about an of- cial “disposal” pattern that blends both approaches. PART 3 Advanced VB Programming Constructs CHAPTER 9 Working with Interface Types This chapter builds on your current understanding of object-oriented development by examining the topic of interface-based programming.
Visual Basic.
Microsoft .NET Framework.
Microsoft software.
Microsoft .NET Framework.
Software engineering.
Microsoft and .NET.
Software Engineering/Programming and Operating Systems.