Memory leak is, when there is unused memory in application and GC can collect it, normally it occurs if some where in application we keep unwanted strong reference of an object, and GC will able to find the path(Direct and indirect) so it can free this object, but this all are true about reference type that mean in Heap memory allocation.
But what about stack And as far i know GC will not responsible to clean up the stack it will automaticaly clean when function will return.
So my question is that Is there any chance that memory leak will occurs in stack also?, if yes then at what scenario and what are the best practices to avoid this kind of leak.