Memory Management

Memory management was introduced in this chapter. Concepts such as root objects, reference trees, generations, and finalization queues were reviewed. The next chapter expands the conversation to include the disposable pattern, weak references, unsafe pointers, and other topics related to memory management.

Understanding the managed paradigm to memory management is particularly important to C-based and C++-based programmers. C programmers are accustomed to managing their own memory with minimal assistance from the environment. For them, memory management in .NET represents a different mindset, which includes adopting different best practices for allocating, managing, and releasing memory. Some C developers perceive the managed memory model as confining, when actually it is liberating. You are liberated from the internal intricacies of memory management.

Although the CLR provides memory management, developers can influence the process, which includes pinned pointer, memory stress, forcing garbage collection, and allocation patterns. These topics are introduced in the next chapter.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.107.85