Releasing Dynamically Allocated Memory
Any memory dynamically allocated with new must be released with delete. The delete operator can be used in two ways: one for de-allocating memory allocated to arrays with new and the other for deleting single objects.
Note that the compiler is not required to generate a diagnostic message for using the wrong delete. Furthermore, using the inappropriate deallocator will result in undefined behavior.
Read more about this topic: New (C++)
Famous quotes containing the word memory:
“In memory everything seems to happen to music.”
—Tennessee Williams (19141983)