Summary: C#/.NET is supposed to be garbage collected. C# has a destructor, used to clean resources. What happen when an object A is garbage collected the same line I try to clone one of its variable members? Apparently, on multiprocessors, sometimes, the garbage collector wins...
The problem
Today, on a training session on C#, the teac...
Ruby is truly memory-hungry - but also worth every single bit.
What do you do to keep the memory usage low? Do you avoid big strings and use smaller arrays/hashes instead or is it no problem to concern about for you and let the garbage collector do the job?
Edit: I found a nice article about this topic here and another one here - old ...
Does anyone know where to get the source code for LambdaProbe?
Alternatively, does anyone know if the project could be moved to a community repository?
Besides the tool not being updated for over a year, the LambdaProbe website has been down since late September 2008.
Background: Lambda Probe is a useful tool for viewing stats on a ...
I'm not asking this question because of the merits of garbage collection first of all. My main reason for asking this is that I do know that Bjarne Stroustrup has said that C++ will have a garbage collector at some point in time.
With that said, why hasn't it been added? There are already some garbage collectors for C++. Is this just...
What is the best way to track down a memory leak that is only found on one customer's test/release box, and no where else?
...
In PHP5, is the __destruct() method guaranteed to be called for each object instance? Can exceptions in the program prevent this from happening?
...
We have similar code to the following in one of our projects. Can anyone explain (in simple English) why the fixed statement is needed here?
class TestClass
{
int iMyVariable;
static void Main()
{
TestClass oTestClass = new TestClass();
unsafe
{
fixed(int* p = &oTestClasst.iMyVari...
One of our programs is sometimes getting a OutOfMemory error on one users machine, but of course not when I'm testing it. I just ran it with jprofiler (on a 10 day evaluation license because I've never used it before), and filtering on our code prefix, the biggest chunk both in total size and number of instances is 8000+ instances of a ...
I have written a custom Rails model. This model is backed by an actually server not by a database table (so it does not inherit from ActiveRecord::Base). In order to get the requested information from the server I open a SSH connection to it. Because rails does not reuse object a new object, as well as a new SSH connection to the serv...
I'm implementing a cache in a class library that i'm using in an asp.net application.
I created my cache object as a singleton pattern with a static method to update the cache which is really just loading a member variable/property with a collection of data i need cached (got some locking logic ofcourse). I figured it was a nice way to...
How can I configure an application, or even an entire machine, to use either the server or workstation flavor of the CLR's garbage collection?
...
What kind of optimization patterns can be used to improve the performance of the garbage collector?
My reason for asking is that I do a lot of embedded software using the Compact Framework. On slow devices the garbage collection can become a problem, and I would like to reduce the times the garbage collector kicks in, and when it does,...
I am working on a web application and I have run into the following situation.
Dim a as Object
Dim i as Integer = 0
Try
For i=1 to 5
a = new Object()
'Do stuff '
a = Nothing
Next
Catch
Finally
a = Nothing
End Try
Do i need to do the a=Nothing in the loop or will the garbage collector clean ...
For example, launch Paint.NET. Then have a look on its memory usage with Task Manager: on my computer, it uses 36Mb.
Then minimize Paint.NET: now it takes only a few more than 1Mb.
This happens with every .NET Application. What happens when a .NET Application is minimized? Is a GC occurring?
...
Given an aggregation of class instances which refer to each other in a complex, circular, fashion: is it possible that the garbage collector may not be able to free these objects?
I vaguely recall this being an issue in the JVM in the past, but I thought this was resolved years ago. yet, some investigation in jhat has revealed a circul...
I have a C# object with a critical resource that needs to be flushed very specific points in time making it a bad candidate to leave around for the garbage collector to take care of whenever it gets around to it, how should I handle this? Is there something like C++'s delete operator that will let me manually kill the instance of this ...
Is it possible to programmatically force a full garbage collection run in ActionScript 3.0?
Let's say I've created a bunch of Display objects with eventListeners and some of the DO's have been removed, some of the eventListeners have been triggered and removed etc... Is there a way to force garbage collection to run and collect everythi...
Given a heapdump or a running VM, how do I discover what the contents of the permanent generation is ? I know about 'jmap -permstat' but that's not available on Windows.
...
I have a problem with a memory leak in a .NET CF application.
Using RPM I identified that dynamically creating controls are not garbage collected as expected. Running the same piece of code in .NET Window Forms behave differently and disposes the control as I expected.
See the output from RPM via PerfMon for the Process Heap counter...
I have a setup where there are two Cocoa processes, communicating with Distributed Objects (DO). The client is using garbage collection, the server is not.
It seems that the client hangs on to the distant objects outside of my direct references to them. This means that even after I don't have references to the objects, they hang around ...