![]() |
CITS2002 Systems Programming |
← prev | next → | ![]() |
![]() |
|||
Scoping and MemoryRecall some important issues with C11 and memory allocation for identifiers:
C++'s new operatorC++ provides another mechanism to allocate memory, which will remain allocated until manually de-allocated.This is very similar to C11's malloc family of functions. The new operator returns a pointer to the newly allocated memory:
Of nore:
C++'s delete operatorIn a manner similar to C11's free() function, C++'s delete operator de-allocates memory that was previously allocated using new
CITS2002 Systems Programming, Lecture 23, p10, 17th October 2023.
|