Top "Garbage-collection" questions

Garbage collection (GC) is a form of automatic memory management which attempts to reclaim garbage, or memory occupied by objects that are no longer in use by the program.

How can I read a large text file line by line using Java?

I need to read a large text file of around 5-6 GB line by line using Java. How can I …

java performance file-io io garbage-collection
Error java.lang.OutOfMemoryError: GC overhead limit exceeded

I get this error message as I execute my JUnit tests: java.lang.OutOfMemoryError: GC overhead limit exceeded I know …

java garbage-collection out-of-memory heap-memory
Is there a destructor for Java?

Is there a destructor for Java? I don't seem to be able to find any documentation on this. If there …

java garbage-collection destructor
When is the finalize() method called in Java?

I need to know when the finalize() method is called in the JVM. I created a test class which writes …

java methods garbage-collection call finalize
Where Is Machine.Config?

I want to apply a change so That I can use Server GC settings for my C# 3.5 app - I …

.net garbage-collection
Deleting Objects in JavaScript

I'm a bit confused with JavaScript's delete operator. Take the following piece of code: var obj = { helloText: "Hello World!" }; var …

javascript pointers object memory-management garbage-collection
Proper use of the IDisposable interface

I know from reading the Microsoft documentation that the "primary" use of the IDisposable interface is to clean up unmanaged …

c# .net garbage-collection idisposable
How to force garbage collection in Java?

Is it possible to force garbage collection in Java, even if it is tricky to do? I know about System.…

java garbage-collection
Do you need to dispose of objects and set them to null?

Do you need to dispose of objects and set them to null, or will the garbage collector clean them up …

c# .net garbage-collection dispose
Java heap terminology: young, old and permanent generations?

I'm trying to understand What the concepts of young, old and permanent generations are in the Java heap terminology, and …

java garbage-collection jvm heap-memory