If the 750 characters added each time are random characters, and
at the end of the loop, you want to keep record of all the 75 
billion chars ever appended, then you can not avoid the excessive
memory usage. This is not a normal program, so do not surprise if
it has abnormal demanding on system resources. 

If that is the case, I do not know if you have to design your 
program this way. There must be better way out.

If every iteration, the same (or a limited possibility of) strings
are added, you may try to declare these possiblities as static Strings
to avoid the massive overhead of object creation. Also, I would 
second the suggestions from John Zukowski about using StringBuffer 
and limit the scope of tempString.

man, 400 million is lots of zero. 

Mingjian Song


> -----Original Message-----
> From: Pepelis, Aaron [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, April 06, 2001 1:27 PM
> To:   [EMAIL PROTECTED]
> Subject:      RE: memory leak... some one help, please!!
> 
> I'm running on win2K with 256MB RAM.
> JDK 1.2.2
>  
> Well, in that main method, it's only loops 400 times, but I have another
> tool that writes to that BufferedOutputArea about... um.. 100 million
> times
> or so, appending about 750 characters per iteration.  What that class is
> suppose to do is cull a certain number of characters after a certain
> number
> of characters making is a buffered out put... any ideas?
> aaron
_______________________________________________
Swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/swing

Reply via email to