This inspection reports any variable declarations of which the scope can be narrowed. Especially useful for "Pascal style" declarations at the start of a method, but variables with too broad a scope are also often left over after refactorings.

Use the checkbox below to enable this inspection to report variables which are initialized with a call to a constructor. This makes the inspection potentially unsafe in cases where the constructor has non-local side-effects, but make it more powerful in that it can find objects that are allocated before necessary, causing increased memory usage.