From ddc10a878c6fe7ea11b77a41fcd3742ffe3b23b2 Mon Sep 17 00:00:00 2001 From: KeybadeBlox Date: Tue, 13 Jan 2026 21:55:22 -0500 Subject: [PATCH] Minor correction to Decompiling C++ Destructors are not directly registered for exit, but instead called by a tiny function that's registered. --- documentation/decompilingcpp.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/decompilingcpp.md b/documentation/decompilingcpp.md index eaf73cb..0abbd7f 100644 --- a/documentation/decompilingcpp.md +++ b/documentation/decompilingcpp.md @@ -122,8 +122,8 @@ lifetime of the program (e.g. global variables or static local variables) have special treatment, having their constructor run before `main()` and their destructor run on program exit. In an Xbox game specifically, the `_cinit()` function called by `mainXapiStartup()` walks a list of function pointers, with -each called function calling an object's constructor and registering its -destructor with `atexit()`. +each called function calling an object's constructor and registering a tiny +function with `atexit()` that calls the destructor. Virtual methods are methods that can be overridden on child classes. They're not called directly, but instead called through a hidden first member that