Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Memory leaks

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi,

I have created a little chat application but I have a problem with it. I think it's leaking memory.

I use a loop to read all the data that the clients send me (With inStream.readUTF() )

I don't created new objects so I don't know WHY it's allocating new memory every time it get a msg from a client.

Anyone has an idear??

Thnx in advance



 
Everytime a string is created, memory is being allocated. It could be that instead of using the String class, you should use the StringBuffer class. Without knowing a lot more about the App it is hard to say.


Wushutwist


Sun Certified Java 2 Programmer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top