• Post Reply Bookmark Topic Watch Topic
  • New Topic

Memory Leak with JTextArea  RSS feed

 
Dean Fredericks
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Im having a problem with using a JTextArea.

When I display around 10Megs of text in it, it requires well over 100 megs of RAM (actuall used memory is 100Megs, while me heap is at like 160Megs).

WHY ??? This is totally unreasonable.

How do I fix this?
 
Mark Van Tuyl
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How are you entering the text into the JTextArea? If you're creating a bunch of Strings, that could be the problem.
 
Ken Blair
Ranch Hand
Posts: 1078
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe this is actually a known problem that's persisted since something like 1999. There was recently someone complaining about the same thing on these forums, but I can't find the thread now. Maybe if you do a search that will help. There is some discussion here of a similar (if not the same) issue.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!