Jump to content

Why Use Dynamic Memory Allocation: Revision history

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

29 November 2025

  • curprev 23:2923:29, 29 November 2025 172.18.0.1 talk 4,517 bytes +4,517 Created page with "<br>As soon as we now not need to make use of a variable that now we have declared dynamically, we can deallocate the memory occupied by the variable. For this, we are able to use the delete expression. It returns the memory again to the operating system. This is named memory deallocation. Let's take a look at an example. It is an efficient follow to set pointer to nullptr after deallocating the memory to keep away from undefined conduct if the pointer is dereferenced. N..."