fa26-cs759 cs759
C++ Memory Management C++ Memory Management
Content locked
The catalog is public. Reading this content requires approved access.
Sign in to readC++ Memory Management
Preface
Why use malloc?
Why use new?
Type Safety
Initialization
Overloading
Interoperability
new and malloc in the same program
In terms of compatibility, it is acceptable for a program to contain calls to both malloc and new.
Can pointers allocated with new be freed?
A pointer which comes from new must be cleaned up using delete.
Takeaways
Further discussions