Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: moderate re-write

...

Reference nulling to "help the garbage collector" is unnecessary. It adds clutter to the code and can introduce subtle bugs. Assigning null to local variables is also unnecessary; the Java Just-In-Time compiler (JIT) can perform an equivalent liveness analysis — most implementations do this. A related bad practice is use of a finalizer to null out references; see OBJ08MET18-J. Avoid using finalizers for additional details.

...