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.


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.