tailieunhanh - C# .NET Web Developer`s Guide P2
Introducing the Microsoft .NET Platform in use, these objects will always have a reference count greater than zero, so unless they are implicitly deconstructed, their memory may never be recovered. For a C or C++ programmer—accustomed to ensuring that objects are properly destroyed, essentially managing memory on their own—this sounds perfectly normal, and a good reason for not trusting anyone else to take care of managing resources. However, in the .NET environment, Microsoft is striving to make developing software easier. Later in this chapter, we cover a how .NET garbage collection works, and the improvements that have been made over. | 8 Chapter 1 Introducing the Microsoft .NET Platform in use these objects will always have a reference count greater than zero so unless they are implicitly deconstructed their memory may never be recovered. For a C or C programmer accustomed to ensuring that objects are properly destroyed essentially managing memory on their own this sounds perfectly normal and a good reason for not trusting anyone else to take care of managing resources. However in the .NET environment Microsoft is striving to make developing software easier. Later in this chapter we cover a how .NET garbage collection works and the improvements that have been made over strict reference counting or manual memory management approaches. Versioning Support Anyone who doesn t understand the phrase DLL Hell hasn t been developing or at least supporting software for Windows very long. For the uninitiated you ll find yourself in DLL Hell someday when a customer installs a software package that uses one of the same DLLs as your application. However your application used version of this DLL and the new software replaces it with version developers all always make sure everything is 100 backwards-compat-ible right The new DLL makes your application exhibit some strange problem or perhaps just stop working altogether. After a lot of investigation you figure out what the offending DLL is and have the customer replace the new one with the version that works with your software. Now their new software doesn t work. welcome to DLL Hell. Many developers resort to simply installing every DLL their application requires in the application directory so that it will be found first when the application loads the defeats the purpose of shared libraries but it is one way around the problem. COM was going to change this one of its primary tenants was that you never changed a methods interface you simply add new methods. Unfortunately software developers are frequently perfectionists and leaving a .
đang nạp các trang xem trước