Effective Java: Clause 6: Eliminate obsolete object references.
Generally speaking, whenever a class manages its own memory, the programmer should be warned about a memory leak. Whenever an element is freed, any reference to the objects contained in the element should be excluded.
I do not think I fully understood the description.
What are some examples of a class that manages its own memory - I can think of an array, a list, possibly a map.
Can someone explain this subject in more detail, is it in the book? Thanks
source share