|Synopsis:||Set a reference field to |
null to tell the garbage collector that the object is no longer needed
Setting reference fields to
null may improve memory usage because the object involved will be unreferenced from that point on, allowing the garbage collector (GC) to clean-up the object much earlier. Please note that this rule does not have to be followed for a variable that is about to go out of scope.