Possible Memory Leak in Java application
Good Morning! How is everyone out there in the world of Java doing today?
I did some research yesterday and found out that I might just have a memory leak in new code and/or existing code in the application that I am working on. I am noticing severe memory increases and CPU utilization going to 100% while running the application. I realize that Java does its own garbage collection, but I must be having a problem with memory and CPU time being gobbled up somewhere. I don't believe that it is in the Netbeans 4.0 IDE as the severity of this problem did not crop up until this week after adding even more code to the application. By the way, I am using a Pentium 4 processor with 512 MB of RAM. Netbeans really flies, but my application now does not, unfortunately for this possible memory leak issue. If you could please afford me any information, links, how to solve a memory leak problem, with steps to get rid of it/them. Even if you feel that this is not a memory leak problem and that it is something else entirely different, your suggestions would be greatly appreciated by me! Thank you very much for all of your time and support!
Possible Memory Leak in Application
Thank you so very much for your great reply. It has helped me in solving my initial problem and that being that I don't find the problem to be a memory leak at all. The problem with absorbing 100% of the CPU power when running under peak conditions can be attributed to the tight loop (i.e. 100 ms applet to servlet and servlet back to applet) within the IDE of Netbeans. My current goal now is to get the application going on Tomcat without the Netbeans and Tomcat Server (in Netbeans) in the loop so as to take away some of the extensive memory and CPU overhead caused by Netbeans 4.0. I have also been informed that Netbeans draws alot of CPU overhead as well as memory from the system as it potentially has memory leaks of its own as well. So, on to battle getting Tomcat working outside of the IDE. I am having problems, but eventually they will be solved. If you have any suggestions about Tomcat as a standalone server running a web application, I would be pleased to hear about them. Because, for some reason When I run my application, the tomcat server finds the servlet, but it can't seem to instantiate it. The java console gives a 404 error (not found error) but this really implies that the servlet just can't be used because it could not be instantiated. Any insights on this would be great! Thank you very much for your time and consideration of my issue!!!!! And, for the great answering of my post!