Ideally, an automatic memory manager would release objects that will not be of any further use for the application.
It has been proven that it is not possible to determine, with 100% accuracy and in all situations, whether a given object will be used afterwards. Instead, garbage collectors use the "next best thing" which is that they release objects which are not reachable: an object for which cannot be accessed from the application, for lack of a path of references to that object, will never be used again by the application since there is no way for the application to even notice that the object still exists. It is an approximation but it is safe: the GC will not release an object that is still in use, but it may fail to release an object that will not be used any further, if that object appears to be reachable (i.e. the application may still reach out and grab the object, if it wishes so).
A "memory leak" is a situation where unused objects use an inordinate amount of RAM. What is "inordinate" depends on the application. A single unused object is rarely a problem. Usual important leaks are situations where unused-but-reachable objects accumulate by thousands.