Arrays, parameter passing, pointers and dynamic allocation. - ELIS
Arrays, parameter passing, pointers and dynamic allocation. - ELIS
Arrays, parameter passing, pointers and dynamic allocation. - ELIS
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Dynamic Memory Management<br />
S Like Java, puts things on the heap instead of the stack (so<br />
can be returned from functions!)<br />
S Unlike Java, you manage memory yourself – no garbage<br />
collection<br />
S Helps create <strong>dynamic</strong> structures, arrays of correct size<br />
S Use new <strong>and</strong> delete<br />
S new finds memory of correct size, returns pointer to it<br />
68