IDEA-109486 CodeStyleManager.reformatText(PsiFile, Collection<TextRange> ranges) has memory leaks — PostprocessReformattingAspect doesn't dispose range markers (in any case this method uses smart psi element pointers, so, is not reliable). CodeStyleManager.reformatRange works correctly (I have already fixed memory leaks in this method, also, this method doesn't use smart psi element pointers). Even scrolling position is preserved :) Now memory leaks only from Structure View.
javadoc
javadoc, notnull
notnull, cleanup
typo