Garbage collection (GC) is a form of automatic memory management. It attempts to reclaim garbage, or memory occupied by objects that are no longer in use by the program.
0
votes
1answer
13 views
When are return values garbage collected?
I'm trying to understand how the Python garbage collector functions and if there is anything I can do to control when an object is collected. I wrote this test:
>>> class Test:
... def ...
2
votes
2answers
44 views
How do I make sure a winform is garbage collected?
As I learned from online and my personal experiment, the finalizer of a form (System.Windows.Forms.Form) never gets called by GC.
It is said that inside the Dispose() of Form GC.SuppressFinalize() is ...
-2
votes
2answers
47 views
can dispose method clear manage code object? [on hold]
As garbage collection can't clear unmanaged code.To clear unmanaged code we use dispose method,but can vice versa possible?can we clear manage code object using dispose method?
0
votes
1answer
43 views
Why does a hashmap clear() free more memory than a pointer reassignment
I have an old and new map that contain hundred thousand entries:
Map<State, CostAndIndex> oldMap = new LinkedHashMap<State, CostAndIndex>();
Map<State, CostAndIndex> newMap = new ...
-1
votes
1answer
48 views
Android App development - Force Garbage collector
I'm writing an Android app and my app functions as expected except when it is left running in the background for long periods of time. When I resume the app after several hours, it crashes. I have ...
2
votes
0answers
25 views
Why is the Java G1 gc spending so much time scanning RS?
I'm currently evaluating the G1 garbage collector and how it performs for our application. Looking at the gc-log, I noticed a lot of collections have very long "Scan RS" phases:
7968.869: [GC pause ...
1
vote
1answer
14 views
Ruby garbage collection on anonymous classes using define_method
I'm trying to track down a memory leak in the state_machine gem that I began to notice when I started dynamically generating state machines using anonymous classes per the README example. This gist ...
0
votes
1answer
18 views
occur memory leak when import uuid
I found memory leak when import uuid.
Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
...
0
votes
3answers
60 views
JAVA garbage Collection
Q: 02 Given:
11. public void genNumbers() {
12. ArrayList numbers = new ArrayList();
13. for (int i=0; i<10; i++) {
14. int value = i * ((int) Math.random());
15. Integer intObj ...
-1
votes
4answers
54 views
In c#,can we use finalize to dispose the managed source?
According to the pattern of how to use IDisposable, Microsoft suggests to use finalize to release unmanaged source.
http://msdn.microsoft.com/en-us/library/system.idisposable%28v=VS.80%29.aspx
But ...
1
vote
1answer
39 views
Garbage collection of class instance variables in ruby
If I use a method like
def self.get_service_client
return @service_client if !@service_client.nil?
@service_client = #initialize logic
end
Now @service_client is an instance variable of a ...
1
vote
1answer
92 views
C# GC not freeing memory [duplicate]
I'm having an awful time with C# not freeing up memory for a large structure I'm holding in memory after I'm no longer referencing it.
I've included some code below that showcases a similar problem ...
1
vote
1answer
44 views
Why don't javascript engines use both reference counting and mark-and-sweep for garbage collection?
Reference counting would seem to be much quicker to remove stuff than a mark-and-sweep garbage collector, as things can be freed and the memory recycled as soon as it is no longer used. The problem ...
1
vote
1answer
26 views
G1 GC processes references too slow
So, we're using G1 GC. and 18GB heap. Young generation size is about 3,5G. And heap maximum usage is about 12G. And memory is full of short-living objects.
Also, maybe it's important that Couchbase ...
0
votes
1answer
11 views
Get memberOf properties for child domain user from root domain GC
I have a parent domain "parent.com" and a child domain "child.parent.com". User A belongs to the parent domain and user B belongs to the child domain.
I connect to the GC of the parent domain by ...