3 ms·
This isn't true - unique_ptr provides protection against Use after Free which is one of the most common memory corruption vulnerabilities in modern application
by telos 10y ago
This isn't true - unique_ptr provides protection against Use after Free which is one of the most common memory corruption vulnerabilities in modern applications.
- pcwalton 10y agoNo, it doesn't. There are many ways to get use after free using unique_ptr combined with references or this pointers.
- RotsiserMho 10y agoProtection != prevention
- pcwalton 10y agoI don't know what this means, but if you're implying that unique_ptr is good enough to prevent use after free in practice, that is obviously empirically false. Every browser engine, for example, uses C++11 and regularly has exploitable use after free.