Decompiling C++: Add static object initialization

This commit is contained in:
KeybadeBlox 2026-01-09 21:06:28 -05:00
parent ee519090c1
commit 8c9f622ab5

View file

@ -117,7 +117,13 @@ its lifetime (e.g. it goes out of scope), which can lead to inclusion in
exception handling code or just being called at the end of a code block even if
the source code doesn't invoke it explicitly. This automatic resource
management is often called part of C++'s RAII (resource acquisition is
initialization) design.
initialization) design. Lastly, objects with constructors that exist for the
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()`.
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