answersLogoWhite

0

The only way to delete objects in an object oriented programming language (unless they were created in heap memory) is for the object to go out of scope. If the object is declared in the heap, in c++ you would use delete[] ptr; or delete ptr; where ptr is a pointer to your object.

User Avatar

Wiki User

15y ago

Still curious? Ask our experts.

Chat with our AI personalities

MaxineMaxine
I respect you enough to keep it real.
Chat with Maxine
FranFran
I've made my fair share of mistakes, and if I can help you avoid a few, I'd sure like to try.
Chat with Fran
RafaRafa
There's no fun in playing it safe. Why not try something a little unhinged?
Chat with Rafa
More answers

You cannot delete elements from an array.

User Avatar

Wiki User

15y ago
User Avatar

Add your answer:

Earn +20 pts
Q: Algorithm to delete
Write your answer...
Submit
Still have questions?
magnify glass
imp