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 to solve "GC overhead limit exceeded" using maven jvmArg?

When running a class I have the following exception: Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded …

java scala maven garbage-collection out-of-memory
How does Java Garbage Collection work with Circular References?

From my understanding, garbage collection in Java cleans up some objects if nothing else is 'pointing' to that object. My …

java garbage-collection
Find out the size of a .NET object

I'm trying to find out how much memory my objects take to see how many of them are ending up …

.net memory-management garbage-collection profiling
Unloading the Assembly loaded with Assembly.LoadFrom()

I need to check the time amount to run GetTypes() after loading the dll. The code is as follows. Assembly …

c# garbage-collection load gettype
Android - Activity Constructor vs onCreate

I understand that Android Activities have specific lifecycles and that onCreate should be overridden and used for initialization, but what …

java android garbage-collection android-activity oncreate
Memory Leak in C#

Is it ever possible in a managed system to leak memory when you make sure that all handles, things that …

c# .net memory-leaks garbage-collection managed
-XX:+UseConcMarkSweepGC (what is default young generation collector?)

As far as I know we can run JVM with the next options: -XX:+UseConcMarkSweepGC -XX:-UseParNewGC in this case …

java garbage-collection concurrent-mark-sweep
What is the difference between gc() and rm()

I am periodically cleaning the memory in R using a call to rm(list=ls()). Do I need to call …

r memory-management garbage-collection
Does using final for variables in Java improve garbage collection?

Today my colleagues and me have a discussion about the usage of the final keyword in Java to improve the …

java garbage-collection final
What is the use of MetaSpace in Java 8?

I know they have replaced PermGen with MetaSpace in Java 8. But I have few questions: Is MetaSpace by default is …

java garbage-collection java-8