Skip to Main Content
Software Essentials
book

Software Essentials

by Adair Dingle
July 2014
Intermediate to advanced content levelIntermediate to advanced
436 pages
12h 27m
English
Chapman and Hall/CRC
Content preview from Software Essentials
352 Appendix B
B.2 OWNERSHIP
C++ programmers must track and deallocate heap memory. When should
a programmer deallocate? Match every new to a delete is a simplistic man-
tra that is dicult to follow in the midst of function calls and aliases. We
provide examples next of pointer usage with respect to memory owner-
ship. e rst function in Example B3 calls the new operator to allocate
a single integer on the heap. When this function executes at runtime, the
address of the heap integer so allocated is returned (and assigned to the
local pointer variable heapInt). In the unlikely event that there is insu-
cient memory available to allocate ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Software Architect’s Handbook

Software Architect’s Handbook

Joseph Ingeno
Economics-Driven Software Architecture

Economics-Driven Software Architecture

Ivan Mistrik, Rami Bahsoon, Rick Kazman, Yuanyuan Zhang
Software Architect Bootcamp

Software Architect Bootcamp

Raphael Malveau, Ph.D. Thomas J. Mowbray

Publisher Resources

ISBN: 9781439841204