IT Home reported on December 22 that according to Microsoft's official press release, Microsoft has now launched Visual Studio 2022 178 Preview 2 version, Microsoft said that since Preview 1, Visual Studio 2022 has strengthened the C++ development experience, introducing features such as visual types and memory usage diagrams, allowing developers to simply view project classes, structure types and other information.
Officially, C++ developers can now "more efficiently" view the memory usage and alignment of data structures, and in the new version, simply hover over the corresponding identifier and a "Quick Info Tooltip" will appear, where developers can quickly view the corresponding information.
Source: Microsoft press release (the same below) In addition, Visual Studio 2022 also adds the "Memory Layout View" feature, Microsoft claims that developers can now more intuitively view information such as "padding", "offset", "footprint" and other information of all data members in the class.
Microsoft also claims that in the future, developers will not need to write additional ** to view the memory usage information "affected by virtual functions" (IT home note: in C++, virtual functions will cause classes to occupy more memory space), and the new version of Visual Studio can directly show the actual memory usage, which can help developers optimize program performance.