Algorithm to delete

1 answer

Answer

1253228

2026-08-10 15:55

+ Follow

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.

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.