Hi again!

Hi again!

I posted the Table of Contents in the eBook owners' private Community already, but I guess it doesn't hurt if I post it here too.

Your comments are welcome, though I may not be able to reply as promptly as I'd like. I'm extremely busy these days, trying to meet the promised deadline!

If you have already ordered the eBook and really wish to contribute, to be sure your voice is heard, join the Community and post your comments there.

You should have received the invitation via email already. If you haven't noticed it, check your mailboxes and spam folder too. The original invitation with the direct private link should be waiting there.

Delphi Memory Management for Classic and ARC compilers

Table of Contents

Introduction

Part 1. Memory management basics and terminology

* Short overview of memory management models

* How memory works?

+ Value types, pointers and references, unmanaged and managed types
+ Variable initialization
+ Invalid pointers/references - wild, dangling, stale
+ Scope and lifetime
+ Resource management - RAII
+ Passing parameters - const, var, out, [ref]

Part 2. Object instances

* Object Instance Lifecycle

* Ownership

* Lifecycle Coding Patterns

+ Create
+ AfterConstruction
+ BeforeDestruction
+ Destroy
+ OnCreate, OnDestroy and similar patterns
+ Component streaming

* To be, or not to be

+ Nil - A Billion Dollar Mistake
+ Nil (Null) Object Pattern

Part 3. Manual memory management

* Releasing object instances
* Methods for releasing object instances
+ Destroy
+ Free
+ FreeAndNil

* Releasing through ownership models
+ TObjectList ownership
+ TComponent ownership
+ TComponent notification system

* Releasing object through it's own callback

* Releasing Forms
+ Release
+ caFree

* Manual memory management coding patterns and practices

Part 4. ARC memory management

* ARC - Overview
+ The golden rule
+ Strong references - Strong, Weak, Unsafe
+ Strong reference cycles

* ARC in Delphi
+ ARC in classic compiler - Interfaces
+ Delphi NextGen ARC compiler

* ARC - Concepts
+ How the reference counting mechanism works
+ Deeper look at strong reference cycles

* Interfaces
+ Mixing object and interface references
+ General coding patterns with interfaces
+ Bugs, issues, pitfalls

* Anonymous methods

* DisposeOf - ARC with a twist
+ Why does DisposeOf exist in Delphi ARC compilers?
+ How DisposeOf works
+ Pitfalls of DisposeOf

* ARC coding patterns
+ Breaking strong cycles
+ Storing weak and unsafe references in collections
+ Other general ARC patterns
+ Interacting with Java and Objective-C objects

* SmartPointer for classic compiler

Part 5. Delphi cross-compiler memory management

* Existing code in the context of ARC
* Delphi cross-compiler coding patterns

Following parts are currently scheduled to be released as free update

Part 6. Memory optimizations
* Safety optimizations
* Speed optimizations
* Memory consumption

Part 7. Memory management tools

* FastMM - full debug mode
* Android Studio Memory Monitor
* Xcode - Instruments
* ARC leak check tool

You can still preorder the eBook at: http://sites.fastspring.com/epixeditions/product/delphimm
http://sites.fastspring.com/epixeditions/product/delphimm

Comments