0
Does this code cause a memory leak?
This is from the challenge given at the end of the object oriented programming lesson. I modified it to "resize" the array every time an element is added. I'm not sure how I would check if it is causing a memory leak. I wrote this on the Sololearn app, but I usually use visual studio. https://code.sololearn.com/co6idzJy597x/?ref=app
2 Respuestas
+ 2
just add a cout in the destructor and see if it prints it
+ 1
Martin Taylor thanks. Would learning C teach me more about <cstdlib>?