Java `OutOfMemoryError` when creating < 100 threads

后端 未结 4 1849
醉梦人生
醉梦人生 2020-12-16 17:26

I\'ve been reading and testing and banging my head on the wall for over a day because of this error.

I have some Java code in a class called Listener t

4条回答
  •  时光说笑
    2020-12-16 17:43

    Just for clarification:

    You provide a ServerSocket to the Thread. Do you send Data to that Socket? Maybe you store to much data within the Thread-Context. Tak a look for a pattern, where you store Streamdata in an byte[].

提交回复
热议问题