I wrote a server program that displays the id's of each thread as it opens. When I close a client connection it closes down properly. and it closes the socket. However next time I display the id's it has incremented by 1 in the server. Should the id if the thread was released properly re use the ID of the previous client??? also I noticed that I have about a 200 bit memory leak, per task manager. the server process keeps growing everytime I close a client by about 200 bytes?
I'm not calling anything like release thread (SHOULT I)?
The way to terminate a thread is to return from the run() method.
You seem to have an expectation that the JVM will reuse numbers when it's assigning thread names. I'm not sure why you decided to expect that but no, it doesn't do that. It just does the simplest thing possible, which is to assign sequential numbers as thread names.
subject: Not sure if I'm closing a thread properly.