Tag: Memory leak
7 posts
-
C++ Memory Leaks: Causes, Detection, and Prevention
Understand heap leaks: lost pointers, exception paths, shared_ptr cycles. Valgrind, ASan/LSan, heap profilers, Visual Studio, RAII, suppression files, and CI.
-
Finding Memory Leaks: Heap Snapshots in Node.js, tracemalloc in Python, Heap Dumps in Java
Tell a leak from high memory use, then find it with heap snapshots and Clinic.js in Node.js, tracemalloc in Python, and heap dumps and jstat on the JVM.
-
C++ Circular References: shared_ptr Leaks and Breaking
Why shared_ptr cycles leak memory, how weak_ptr breaks cycles, parent/child and cache/observer patterns, use_count debugging, Valgrind, and ASan.
-
Missing Virtual Destructor: Why Deleting Through a Base Pointer Leaks or Worse
Why deleting via a base pointer without a virtual destructor is undefined behavior, what GCC warns about, why unique_ptr<Base> hits it but shared_ptr hides it.
-
Tracking Down C++ Memory Leaks: Five Dangerous new/delete Patterns, Valgrind and ASan
What new and delete really do, five patterns that leak or corrupt memory, from double delete to delete vs delete[], and catching them with Valgrind and ASan.
-
Finding C++ Memory Leaks: Valgrind and AddressSanitizer
Find C++ heap leaks with Valgrind, ASan/LeakSanitizer and the Visual Studio CRT debug heap, then fix early returns, exception paths and shared_ptr cycles.
-
C++ Memory Leak Debugging Case Study
A C++ server memory leak walkthrough: tracing and fixing it with Valgrind, ASan, and Heaptrack—from symptoms and root cause to fixes and prevention.