What’s In This Chapter?
Wrox.com Code Downloads for This Chapter
The wrox.com code downloads for this chapter are found at www.wrox.com/go/professionalcsharp6 on the Download Code tab. The code for this chapter is divided into the following major examples:
Resources is an overloaded term. One use of the term resources you can find with localization. With localization, resources are used to translate text and images. Based on the user’s culture, the correct resource is loaded. (This is discussed in Chapter 28, “Localization.”) Another use of the term resources you can read in this chapter. Here, resources are used with a different topic: using managed and unmanaged resources—objects that are stored on the managed or the native heap. Although the garbage collector frees up managed objects that are stored in the managed heap, it isn’t responsible for the objects in the native heap. You have to free them on your own.
When you use a managed environment, you can easily be misled to not pay attention to memory management because the garbage collector (GC) deals with that anyway. ...