summaryrefslogtreecommitdiff
path: root/plugins/InspectionGadgets/src/inspectionDescriptions/AnonymousInnerClassMayBeStatic.html
blob: a0794ca5dfc89ecd6110d14a8aa538a844002590 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
<html>
<body>
Reports any anonymous classes which may safely be made into a named <b>static</b> inner class.
An anonymous class may be <b>static</b> if it doesn't explicitly reference its enclosing instance or local variables from its surrounding method.
<p>
A <b>static</b> inner class does not keep an implicit reference to its enclosing instance.
This prevents a common cause of memory leaks and uses less memory per instance of the class.
  <!-- tooltip end -->
<p>

</body>
</html>