Try the fastest way to create flashcards
Question

You should only use the delete operator to deallocate memory that was dynamically acquired with the __________ operator.

Solutions

Verified
Answered 2 years ago
Step 1
1 of 2

Only use pointers with delete that were previously used with new\textbf{new}. If you use a pointer with delete that does not reference dynamically allocated memory, unexpected problems could result!

Create a free account to view solutions

Create a free account to view solutions

Recommended textbook solutions

Starting Out with C++: Early Objects 8th Edition by Godfrey Muganda, Judy Walters, Tony Gaddis

Starting Out with C++: Early Objects

8th EditionISBN: 9780133360929Godfrey Muganda, Judy Walters, Tony Gaddis
844 solutions
Fundamentals of Database Systems 7th Edition by Ramez Elmasri, Shamkant B. Navathe

Fundamentals of Database Systems

7th EditionISBN: 9780133970777Ramez Elmasri, Shamkant B. Navathe
961 solutions
Introduction to Algorithms 3rd Edition by Charles E. Leiserson, Clifford Stein, Ronald L. Rivest, Thomas H. Cormen

Introduction to Algorithms

3rd EditionISBN: 9780262033848Charles E. Leiserson, Clifford Stein, Ronald L. Rivest, Thomas H. Cormen
872 solutions
Introduction to Algorithms 4th Edition by Charles E. Leiserson, Clifford Stein, Ronald L. Rivest, Thomas H. Cormen

Introduction to Algorithms

4th EditionISBN: 9780262046305Charles E. Leiserson, Clifford Stein, Ronald L. Rivest, Thomas H. Cormen
945 solutions

More related questions

1/4

1/7