I am writing a web. It works well, except it seems to be a memory leak. The program will work fine for about 15 minutes, and then it will fail.
If I track it using the Profile function in NetBeans, I see that the memory increases over time, until in the end I get java.lang.OutOfMemoryError and the program will work completely.
The following figure shows the memory snapshots of objects used after one minute and after 15 minutes (before the crash.) Can I indicate where these objects (my main culprits are byte[] and char[] ) or that they still refer to them (and to prevent their destruction by the garbage collector)?
Or do I have no idea what I'm talking about?

Thank you, I appreciate the help.
source share