In this chapter, we will look at the resource management techniques of D. We'll learn the following:
Avoiding the garbage collector
Making a reference-counted object
Manually managing class memory
Using scope guards to manage transactions
Creating an array replacement
Managing lent resources
Creating a
NotNull
structUsing unique pointers
Using RAII and handling the limitations of class destructors