Comment Oh boy, are you kidding me? (Score 1) 1
auto* foo = new Foo();
delete foo;// The memory location pointed to by foo is not representing // a Foo object anymore, as the object has been deleted (freed).
foo->Process();
In the example above, foo is used after its memory has been returned to the underlying system. The out-of-date pointer is called a dangling pointer and any access through it results in a use-after-free (UAF) access. In the best case such errors result in well-defined crashes, in the worst case they cause subtle breakage that can be exploited by malicious actors.
They keep coming up with new names for shooting yourself in the foot in C++, then claiming that "C++ ain't safe". Government Browser. Government Operating System (this includes MacOS, Windows, Linux, Android and others) and now: "thou shall use the government programming language only".
Just fuck off!