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.

Java GC (Allocation Failure)

Why always "GC (Allocation Failure)"? Java HotSpot(TM) 64-Bit Server VM (25.25-b02) for linux-amd64 JRE (1.8.0_25-b17), CommandLine flags: -XX:CMSInitiatingOccupancyFraction=60 …

java garbage-collection
How to free memory in Java?

Is there a way to free memory in Java, similar to C's free() function? Or is setting the object to …

java garbage-collection
How to monitor Java memory usage?

We have a j2ee application running on Jboss and we want to monitor its memory usage. Currently we use …

java garbage-collection monitoring memory-management
Java Garbage Collection Log messages

I have configured java to dump garbage collection information into the logs (verbose GC). I am unsure of what the …

java logging garbage-collection
Why doesn't C++ have a garbage collector?

I'm not asking this question because of the merits of garbage collection first of all. My main reason for asking …

c++ garbage-collection c++11
how to destroy an object in java?

I encountered this question in an interview with following options: How to destroy an object in java? a. System.gc(); …

java garbage-collection finalize
GC overhead limit exceeded

What is the sampling time JVM uses to throw 'java.lang.OutOfMemoryError : GC overhead limit exceeded'? I know you can …

java garbage-collection jvm
Best Practice for Forcing Garbage Collection in C#

In my experience it seems that most people will tell you that it is unwise to force a garbage collection …

c# .net garbage-collection
When does System.gc() do something?

I know that garbage collection is automated in Java. But I understood that if you call System.gc() in your …

java garbage-collection
Stack, Static, and Heap in C++

I've searched, but I've not understood very well these three concepts. When do I have to use dynamic allocation (in …

c++ static garbage-collection stack heap