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
362 Appendix B
used to avoid data redundancy or integrity problems. Aliases are problem-
atic when not tracked. If two dierent pointers (references) hold the same
address to a heap object and each pointer assumes that it owns this heap
data, then either pointer can manipulate this data, including deallocating
it, without regard to any other “owner.” In C++, with a properly dened
destructor, but without properly dened copying, if objB were to go out of
scope before objA, then objA would continue to point to memory that it
no longer owned. Premature deallocation, data corruption, and memory
leaks are all undesirable side-eects of unforeseen aliasing.
Figure B7 illustrates properly dened deep copying: the value of every
nonpointer e ...
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