educative.io

Educative

Delete leaks the pointer being deleted

The delete function leaks the pointer being deleted!
I suggest using ‘delete currentNode;’ before ‘return deleted;’


Type your question above this line.

Course: https://www.educative.io/collection/5642554087309312/5646276079124480
Lesson: https://www.educative.io/collection/page/5642554087309312/5646276079124480/5152192772177920

hi @Jorge_Amengol ,

Thank you so much for reaching out to us and thank you so much for letting us know about the memory leakage and we have updated this in our course. If you find more of such things, please do let us know. Thank you.