Minor correction to Decompiling C++

Destructors are not directly registered for exit, but instead called by a
tiny function that's registered.
This commit is contained in:
KeybadeBlox 2026-01-13 21:55:22 -05:00
parent 44a8d704ef
commit ddc10a878c

View file

@ -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 special treatment, having their constructor run before `main()` and their
destructor run on program exit. In an Xbox game specifically, the `_cinit()` destructor run on program exit. In an Xbox game specifically, the `_cinit()`
function called by `mainXapiStartup()` walks a list of function pointers, with function called by `mainXapiStartup()` walks a list of function pointers, with
each called function calling an object's constructor and registering its each called function calling an object's constructor and registering a tiny
destructor with `atexit()`. function with `atexit()` that calls the destructor.
Virtual methods are methods that can be overridden on child classes. They're 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 not called directly, but instead called through a hidden first member that