When should weak references be used?
I recently came across a piece of Java code with WeakReferences - I had never seen them deployed although I'd come across them when they were introduced. Is this something that should be routinely used or only when one runs into memory problems? If the latter, can they be easily retrofitted or does the code need serious refactoring? Can the average Java (or C#) programmer generally ignore them? EDIT Can any damage be done by over-enthusiastic use of WRs? Weak references are all about garbage collection. A standard object will not "disappear" until all references to it are severed, this means