Get the latest tech news

Tracking (C++) Shared Pointer Leaks


There are many good practices one can employ. I won’t delve into good practices here. I’ll go for the heavy guns

If I log all currently allocated blocks (or a select suspicious few), with my domain knowledge I can find or clear leak suspects based on the provided metadata. Every time a referer is added (via copying or creation), or changed (via moving or swapping), the control block gets notified with special method calls. Let’s say that we will use standard smart pointers most of the time to avoid worying about third party software and only resort to xmem occasionally, when we suspect leaks or when we run tests.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of tracking

tracking

Photo of C++

C++

Photo of Shared Pointer Leaks

Shared Pointer Leaks

Related news:

News photo

Show HN: Iceoryx2 – Fast IPC Library for Rust, C++, and C

News photo

Mozilla faces a privacy complaint over Firefox's tracking

News photo

The empire of C++ strikes back with Safe C++ blueprint