I have read that memory leak in C++ works different as compared to that in Java. I know automatic memory management takes care in Java. whereas, in C++ memory management is handled by the programmers. Any flaw in programming will make the small amounts of data improperly reclaimed or lost
On the other hand in Java we have unreferenced objects (also dead objects) once they have been used. And I realised that all unreferenced objects are unused objects. But there would be some unused objects which are referenced and Garbage collector fails to recognize them. That is what I read about memory leak in Java.
So my question here is: Both memory leak concepts are different different in C++ and Java. Please correct me if I am missing something.
Thanks !!