Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

use-after-free

Using heap memory through a pointer after that memory has been freed; the program may read garbage, corrupt another object or crash later.

A use-after-free is a read or write through a dangling pointer to a freed heap block; because the allocator may have reused the block for another object, the effect depends on allocation history and often appears far from the bug.

Examples

  • delete p; p->x = 1; writes to memory the allocator may already have given to someone else.

Read the full section →