Comment

Comment by alexeiz

By today's standards the code of the old task manager (as most of the code in Windows) is a big pile of stinking Underfined Behavior.

For example:

    void COptions::SetDefaultValues() {
        ZeroMemory(this, sizeof(COptions));
is a great way to overwrite a vtbl pointer and end up with a invalid object state. There is a safe and perfectly Standard compliant way to reset the object to its default state: `*this = COptions()`
parent alexeiz 5 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton