lundi 23 juillet 2018

Should we Deallocate memory before throwing an exception

I have an application which should throw an exception if it encounters a situation. Application aborts, excepted behavior.

Address sanitizer is reporting memory leaks for this scenario. Should I consider fixing the memory leaks in this case (or) Should I not do it as the application is terminating anyways and the memory will be reclaimed by the OS anyway.

Aucun commentaire:

Enregistrer un commentaire