Translations:Development/FAQs/Technical FAQ/103/en: Difference between revisions
(Importing a new version from external source) |
(No difference)
|
Latest revision as of 17:40, 19 July 2019
Yes. Calling delete on a null pointer is a noop in C++. Having "if (ptr) delete ptr;" is redundant. Doing ptr = 0;
after a delete is a good idea, especially if the delete can be called on it from a different code path.