The application uses threads to process incoming connections and one queue for writing to the database. There is a memory leak. Since, apart from the streams and their internal objects, nothing is created there is a suspicion that the streams having worked continue to occupy memory.
How to find out the number of threads in the application?