| | |
Memory Leaks in Java
![]() |
•
•
Join Date: Dec 2004
Posts: 489
Reputation:
Solved Threads: 5
Its quite hard to make memory leaks in java, having said that I've done it by leaving active connections open.
The try { } catch{} {finally} blocks help in preventing such a case from arrising.
The try block allows the code to throw exceptions - in the exception were plausable any variables that were created within the try should be set to NULL to allow the garbage collector to release the memory back to the JVM.
The finally block allows executes no matter what happend in the try block.
Hope this helps.
The try { } catch{} {finally} blocks help in preventing such a case from arrising.
The try block allows the code to throw exceptions - in the exception were plausable any variables that were created within the try should be set to NULL to allow the garbage collector to release the memory back to the JVM.
The finally block allows executes no matter what happend in the try block.
Hope this helps.
![]() |
Similar Threads
- StringTokenizer problem (Java)
- write a poem (Software Development Job Offers)
- C++ Vs Java (C++)
- C/C++ vs. C# (IT Professionals' Lounge)
- Python Stat points... (Python)
- This Should be Easy for You Guys! (Linux Servers and Apache)
Other Threads in the Java Forum
- Previous Thread: creating an instant messenger program in java
- Next Thread: updating text fields in GUIs
| Thread Tools | Search this Thread |
-xlint add android api applet application applications array arrays automation bank bi binary blackberry bluetooth chat class client code compile compiler component database development digit eclipse equation error event fractal freeze functiontesting game gameprogramming givemetehcodez graphics gui health html hyper ide idea image infinite input int integer j2me java javame javaprojects jetbrains jni jpanel jtable julia learningresources linux list login loop main map method methods mobile myregfun netbeans newbie nonstatic notdisplaying pearl problem program programming project qt recursion scanner screen scrollbar server set sms sort sorting spamblocker sql sqlserver string superclass swing system text-file thread threads tree variablebinding windows xor






