I am facing a problem of memory leak in the case of
javax.swing.text package. I open a 1MB file and load it into JTextArea
When I clear the contents of the textarea by setText("") method,
memory is not at all released. I check out from a memory profiler that
there are thousands of instances of AbstractDocument.LeafElement,
AbstractDocument.GapContent&MarkData .........