vendredi 9 décembre 2022

no error occur when I try to free memory twice

I wrote this code,and i was trying to get an error from freeing the memory twice because of the shallow copying of objectsenter image description here

but i found out that the compiler did not complain and it compiles successfully without any errors, does anyone knows why, I watched youtube videos and they were getting error from the same code. did i write something wrong or the memory is not really freed?

Aucun commentaire:

Enregistrer un commentaire