Questions tagged [garbage-collection]
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.
garbage-collection
12,198
questions
1
vote
2
answers
41
views
Memory / garbage collector issues with Java Spring service
I have a memory issue with a Java service (21) using the Spring framework (3.2.1).
The service is quite simple. It exposes a REST endpoint.
When this endpoint is called, the service makes an HTTP ...
0
votes
0
answers
18
views
How to Tune GC for applications maintaining large amount of cache data?
We are running Spring boot restapi application in Production. Suddenly process is not accepting any requests and we couldn't see logs also. Process got hung. We are using G1GC .We are maintaining ...
0
votes
0
answers
24
views
tkinter image collecter by garbage collector python
I'm trying to display a PIL image that i converted to tkImage inside a function of my main class representing my application.But i keep having the error corresponding to the suppression of my tkImage ...
-1
votes
0
answers
24
views
Shenandoah GC hueristics static is not working as expected
I am using Shenandoah GC and using eclipse-temurin:21-jre
I started my application with below java arguments -
-Xms1g -Xmx1g -Xmn768m -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions -...
0
votes
1
answer
58
views
Parse large xml file with XMLPullParser or Sax-Parser in Android causes lags
I'm having following problem: In my android tv app I can add (and later update) epg-sources, as .xml, .gz or .xz file (.gz and .xz are decompressed to .xml). So the user adds an url for a file, it ...
0
votes
1
answer
37
views
Is it important to call `close()` on an file opened with `open()` if `flush()` is called after each write() operation?
I have read that it is important to call close() on a file which has been opened with open(filename, 'w'|'a') because otherwise changes made to the opened file may not be persisted. I believe this is ...
0
votes
1
answer
50
views
How to Print Humongous Allocations in a Java Program Without Using GC Logs?
I'm currently working on a Java application that makes use of humongous allocations and regions. Typically, I would monitor these allocations and regions using the GC (Garbage Collection) logs. ...
1
vote
1
answer
48
views
OpenJDK Java17 ZGC garbage collector won't use more than 20% of allocated ram [closed]
I have a very high throughput microservice running in AWS in ECS using OpenJDK Java17. I'm testing with ZGC moving from G1GC and I notice that ZGC will not use the full allocated heap (10g), only 20% ...
0
votes
0
answers
23
views
Error: VM option 'UseG1GC' is experimental and must be enabled via -XX:+UnlockExperimentalVMOptions. Error: Could not create the Java Virtual Machine
I install JAVA 8 from Oracle's offcial website on my new mac.
I want to run unit tests for my scala project on my local.
I am able to build the project with mvn clean install -DskipTests successfully.
...
0
votes
0
answers
27
views
System.Windows.Controls.PrintDialog handle not released on cancel
We have a simple method looking like this:
public void DisplayPrintDialog(Document document)
{
try
{
PrintDialog printDialog = new PrintDialog();
if (printDialog.ShowDialog() ?...
2
votes
0
answers
108
views
Should I implement a C# destructor (aka finalizer) to unsubscribe from a system event? [duplicate]
Answer to "duplicate" - while a weak event may be the best solution here. The question is very different.
In this answer we are told to (almost) never write a destructor by someone who ...
-1
votes
2
answers
51
views
Will this code cause a memory leak in Flutter?
Will this code cause a memory leak in Flutter?
Classes A and B reference each other:
The VM in Flutter has GC, which is different from other languages I've learned, such as OC or Swift.
I observed ...
-1
votes
1
answer
66
views
High Memory Usage with large number of object in java
I have the below sample code which loop for 50 Million time and create objects of MyDataHolder . MyDataHolder has two variants one is hashmap based and the other is variable based. see (...
0
votes
0
answers
30
views
Git's built-in garbage collection vs JGit handling of garbage collection operation ( Built-in Git vs JGit garbage collection mechanism)
Here are the few points :
Git's built-in mechanism automatically triggers the git gc when the number of loose objects are high or it detects repository size is huge and objects should be garbage ...
2
votes
1
answer
89
views
Does Boehm GC release memory?
I've been looking at the Boehm GC (for C/C++) and it seems to me that (on Windows, but probably on linux as well) the GC, by default, never releases the memory it has asked for.
Worth to note is that ...