Why are you explicitly using “delete” ? They will automatically free up memory when we go out of scope. Also, I heard that deleting might cause memory errors in circumstances, eg- When “freeing” a memory which wasnt allocated.
Why are you explicitly using “delete” ? They will automatically free up memory when we go out of scope. Also, I heard that deleting might cause memory errors in circumstances, eg- When “freeing” a memory which wasnt allocated.