I know GC wasn't popular in the days when Ada was developed and for the main use case of embedded programming it is still not a good choice.
But considering that Ada is a general purpose programming language why wasn't a partial and optional (traces only explicitly tagged memory objects) garbage collector introduced in later revisions o...
I thought the GC would call Dispose eventually if your program did not but that you should call Dispose() in your program just to make the cleanup deterministic.
However, from my little test program, I don't see Dispose getting called at all....
public class Test : IDisposable
{
static void Main(string[] args)
{
Test s ...
From what I understand, in standard C++ whenever you use the new operator you must also use the delete operator at some point to prevent memory leaks. This is because there is no garbage collection in C++. In .NET garbage collection is automatic so there is no need to worry about memory management. Is my understanding correct? Thanks...
I don't understand garbage collection so good, then I want to know, why it's so important to a language and to the developer?
...
Hi All,
I am relatively new to .net. As I was trying to grasp the concept of Garbage Collection(from "CLR via C#"), I came to know how strong is the Garbage collection approach. But then as I read I understood that native resources allocated should be released. The methods are:
i) Making our type derive from CriticalFinalizerObject type...
I have heard several people claiming that you can not scale the JVM heap size up. I've heard claims of the practical limit being 4 gigabytes (I heard an IBM consultant say that), 10 gigabytes, 32 gigabytes, and so on... I simply can not believe any of those numbers and have been wondering about the issue now for a while.
So, I have thr...
I need a game state object in lua(not c++ or tied to C++) to manage lights, cameras, objects, events from my C++ engine (the lua objects are seperate entities from c++, pretty much just standard lua tables). I am concerned about how the GC is going to act in removing these objects since they are going to be created and removed on the fly...
I have a large multi-threaded C# application running on a multi-core 4-way server. Currently we're using "server mode" garbage collection. However testing has shown that workstation mode GC is quicker.
MSDN says:
Managed code applications that use the server API receive significant benefits from using the server-optimized garbage ...
I cannot seem to understand the behavior of GC.Collect() under the presence of a class overriding Object.Finalize(). This is my base code:
namespace test
{
class Foo
{
~Foo() { Console.WriteLine("Inside Foo.Finalize()"); }
}
static class Program
{
static void Main()
{
{
Foo bar = new Foo();
}
GC.Collect();
...
In a GC enabled language, when observer subscribes to events of subject, actually subject got a reference of observer.
So before drop an observer, it must un-subscribes first. Other wise, because it's still referenced by subject, it will never be garbage collected.
Normally there are 3 solutions:
Manually un-subscribes
Weak Referen...
I had trouble coming up with a good way to word this question, so let me try to explain by example:
Suppose I have some interface. For simplicity's sake, I'll say the interface is IRunnable, and it provides a single method, Run. (This is not real; it's only an example.)
Now, suppose I have some pre-existing class, let's call it Cheetah...
How do I make Flex/ActionScript 3 objects eligible for garbage collection? What are the thumb rules?
... apologies if this was answered else where.
...
In my job we had a problem with OutOfMemoryExpections. I've written simple piece of code to mimic some behavior, and I've ended up with the following mystery. Look at this simple code which blows up when it runs out of memory.
class Program
{
private static void Main()
{
List<byte[]> list = new List<byte[]>(200000);
...
I noticed that garbage collection is not yet implemented in gccgo.
http://golang.org/doc/gccgo%5Finstall.html#Unimplemented
Does the standard Go compiler (gc) support garbage collection yet?
...
I guess this is very basic but since I'm learning .NET by myself, I have to ask this question.
I'm used to coding in C, where you have to free() everything. In C++/.NET, I have read about the garbage collector. From what I understand, when an instance is no longer used (in the scope of the object), it is freed by the garbage collector.
...
I need an alternative to Java, because I am working on a genetics-calculation project.
It takes a lot of memory and the most of the cpu time. And therefore it won´t work when I deploy it on a server, because many people use the program at the same time.
Does anybody know another language that is not running in a virtual machine and is s...
Hi,
i'm new to xcode / cocoa and even objective-c thus my question might be stupid. Im trying to write a program that will hash files in a folder. I looked around and found a way to load a file via a NSData object and than hash it's bytes with CC_SHA512.
If i try to hash a few more files i noticed my memory running out. Using the Run -...
I know that in PHP you don't have to free memory.
Is it reached by garbage collector?
...
I have a Django application that exhibits some strange garbage collection behavior. There is one view in particular that will just keep growing the VM size significantly every time it is called - up to a certain limit, at which point usage drops back again. The problem is that it's taking considerable time until that point is reached, an...
Hi,
My application loads a data set of approx. 85bm to 100mb each time. The application's memory limit is set to 512mb, and this is, theoretically, more than enough.
However, I found that if, in a single run of the application, I opened and closed the data set 5 times, the total memory consumption steadily increases, until I get an out...