Debugging C/C++ Memory Issues in Visual Studio

Learn to find and fix critical memory leaks and issues in C/C++ applications. This course teaches you to master Visual Studio's powerful debugging tools, including the CRT Debug Heap and memory snapshots, ensuring your programs are robust and efficient.

Image14

Course Description

This course equips you with the essential skills to identify and eliminate performance-sapping memory leaks and other critical memory issues in your C/C++ projects. You'll gain a deep understanding of memory allocation and common pitfalls, then master Visual Studio's powerful debugging tools, including the CRT Debug Heap and memory snapshots, to efficiently pinpoint and resolve memory errors, ultimately leading to more robust and reliable applications.

Features

8-hrs On Demand Video

Exclusive 1-on-1 With Instructor

Course Completion Certificate

Priority Q/A

Full Lifetime Access

Community Access

Curriculum

Understand in detail on what is planned under each module

🧑‍🏫 Course Introduction

📞 Exclusive 30-Minute Session

📄 Source Code

📊 Course Material

Process Memory Layout

Introduction to Pointers

Using Visual Studio

Quick Introduction to Visual Studio Debugging

Byte Ordering

Progress Update

Introduction To Debugging

Defensive Coding - I

Defensive Coding - II

Assertions

Assertions Guidelines

Compile-Time Assertions

Visual Studio Debugger

Debugging Basics

Watch

Breakpoints - I

Breakpoints - II

Callstack

Memory

More Debugging Features

Source code

C Allocation Functions

Examples

Reallocation

C++ Allocation Operators

How new works - I

How new works - II

Exceptions

new handler

Non-throwing Source Files

Non-throwing new - I

Non-throwing new - II

Non-throwing new - III

Placement new - I

Placement new II

Placement new III

Pplacement new IV

Placement new V

Operator new & delete functions

Memory Management Issues

Uninitialized Pointers - I

Uninitialized Pointers - II

Buffer Overflow - Stack

Buffer Overflow - Heap

Dangling Pointers - I

Dangling Pointers - II

Memory Leaks - I

Memory Leaks II

Source Files

String Class - I

String Class - II

String Class - III

String Class - IV

Detecting Heap Corruption in String

Heap Checker Class - I

Heap Checker Class - II

Heap Checker Class - III

Heap Checker Class - IV

Heap Checker Class - V

Source Files

_CrtDumpMemoryLeaks() function

_CrtDumpMemoryLeaks() Example

Leak Detection Flags

Detailed Leak Dump

Exercise

Memory Snapshots - I

Memory Snapshots - II

Memory Checkpoint Class

Issues with checkpoints

Snapshots in Visual Studio - I

Snapshots in Visual Studio - I

Report Modes & Types - I

Report Modes & Types - II

Redirecting to File

Source Files

Leak Detection Internals

Memory Block Header

Implementing ptfree()

Implementing ptDumpLeaks()

Adding C++ Support - I

Adding C++ Support - II

Compiling on Linux

Heap Corruption Internals

PtCheckMemory() Implementation - I

PtCheckMemory() Implementation - II

Memory Alignment & Structure Padding

Block Header Alignment

Course Certificate

Why Do This Course

Learn to identify and fix memory leaks that can slow down your applications and lead to crashes over time.

Gain a deep understanding of how memory is allocated and deallocated in C/C++, including both C-style and C++-style operators and their internals.

Recognize and debug issues like uninitialized pointers, buffer overflows, and dangling pointers that can introduce severe vulnerabilities.

Leverage the robust memory debugging capabilities of Visual Studio, including the CRT Debug Heap, to quickly find and resolve memory errors.

Learn to use memory snapshots, detailed allocation dumps, and custom helper classes to pinpoint the source of leaks efficiently.

Requirements

  • Basic knowledge of C++
  • Modern C++ compiler (Visual Studio 2022, gcc 13, clang 17)

Related Courses

Additional courses that may be relevant to your interests

Image23

Instructor


- Hello! I'm Umar Lone

I've educated and mentored students and professionals globally, leveraging over 20 years of experience in C++, Object-Oriented Programming, Design Patterns, and related technologies. My professional background includes significant contributions to C++, Java, and C# projects with esteemed companies, alongside providing specialized project consultation & mentoring.


My current focus is on delivering comprehensive video courses that distill this extensive knowledge. I specialize in transforming intricate concepts into clear, practical, and actionable insights, supported by real-world examples. This approach is designed to equip you with the necessary clarity and confidence for sustained growth and impactful contributions within your projects and career trajectory.


Begin your learning journey with me now and unlock the advanced understanding and practical expertise essential for making a significant impact in your field.


Keep in touch

Subscribe for announcements, new courses & discount coupons

Yes please, save my details so you can send me educational content that is relevant and helpful.