Many people working on Delphi projects may not have given much thought to memory management. You may think that there is little need to study the subject, and depending on the nature of your projects, that may be true. But it is always good to increase your understanding of what Delphi is doing, and how it does things.
Delphi Memory Management, by Dalija Prasnikar, is an excellent presentation of the subject. Her knowledge is plainly evident in her writing, and she has provided a very methodical and approachable coverage. Full disclosure: I proofread and provided feedback on the content of this book, so my objectivity is limited.
The book begins with a short discussion of clean coding practices, which are not only good advice, but if you do need to concern yourself with memory management, they are essential practices.
In Part 1 she offers a detailed coverage of memory basics and jargon. You may be tempted to skip this, but don’t–you may have forgotten some of the material which you learned years ago, and it will serve you well to be sure that you properly understand what the author means when referring to particular memory management aspects.
Part 2 presents object instances and their management. You should come out pf this with a clear understanding of how best to handle objects in your code, and how to minimize risky usage. Having studied a great deal of Delphi code in legacy projects, I can say with confidence that there are many developers who need to read and study this section of the book!
Part 3 is devoted to manual memory management practices. Once again, the basics are covered, and then ownership models and usage patterns. The presentation is orderly and concise, and a thorough study will be likely to change your coding practices.
Part 4 covers automatic reference counting (ARC), and as there are numerous ways to misunderstand what it can and cannot do for you, this merits close attention. In particular, if you have not really gone beyond the use of interfaces, then this portion of the book will expand your horizons. Besides the matters of reference counting and weak and strong references, you will find a chapter devoted to anonymous methods.
Part 5 concludes the book with a brief but useful discussion of coding patterns. In particular, Dalija discusses the smart pointer and its operation.
Few authors have written on the subject of memory management in Delphi, and this book is one you will want to keep nearby. In it you will find clear discussion of matters not covered in depth elsewhere, and code samples to illustrate correct and incorrect usage.
I have read many books on Delphi which covered the language and the VCL. Some I have kept around, others were less essential. Delphi Memory Management is one which I will keep in my permanent collection. I recommend it highly.