Fixed leak in IndetationCheck (always clear the chaches ;)
This commit is contained in:
parent
861e2af0e1
commit
0dfec6f430
|
|
@ -228,6 +228,12 @@ public class HandlerFactory
|
|||
return new MethodCallHandler(aIndentCheck, aAst, aParent);
|
||||
}
|
||||
|
||||
/** Clears cache of created handlers. */
|
||||
void clearCreatedHandlers()
|
||||
{
|
||||
mCreatedHandlers.clear();
|
||||
}
|
||||
|
||||
/** cache for created method call handlers */
|
||||
private Map mCreatedHandlers = new HashMap();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -230,6 +230,7 @@ public class IndentationCheck extends Check
|
|||
*/
|
||||
public void beginTree(DetailAST aAst)
|
||||
{
|
||||
mHandlerFactory.clearCreatedHandlers();
|
||||
mHandlers.clear();
|
||||
mHandlers.push(new PrimordialHandler(this));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue