If not does that mean that I would have to end each function by deleting all local variables if I wanted to prevent 100% of memory leak?
The local variables that are allocated on stack, i.e. without using memory allocation functions or operators like malloc and new, are deleted automatically. All other variables have to be deleted by using delete as they are stored on heap.
malloc
new
delete