We need more details, is that particular line of code inside a method? or
inside an instance?
The way you declare it seems like this is inside a method.
The GC collects any memory that is not being referenced. as soon as an
entity (like double[1000]) is not longer accesible it will be ready to be
collected.
then use the array, then at some later point, allocate it again, eg:
double[] x = new double[15000];
does the garbage collector know that the memory allocated the first time
round can be garbage
collected, or do I have to set x to null first before allocating the
second time around?
Re: to dispose or not ? ... The dotNet garbage collector is, at it's heart, a move to another heap style collector for the Gen0 and Gen1 heaps and a mark/sweep/compact collector for the Gen2 heap. ... Setting an object to Nothing simply releases the reference from the variable to the object in the heap. ... (microsoft.public.dotnet.languages.vb)
Re: how to self-destruct an object in Java? ...collector is a red flag. ... > By disposeto free native resources, do you mean the underlying JNI ... work will be completed BEFORE an allocation fails.... application won't fail just because the garbage collector isn't working ... (comp.lang.java.help)
Re: Recursive mex function hangs ... The first time I ... int nrhs, const mxArray *prhs) ... You don't allocate memory for R? ... for R right on the stack,... (comp.soft-sys.matlab)
Leopard Garbage ... I've found the information I was looking for about Objective-C 2.0's garbage collection! ... the Objective-C 2.0 garbage collector is implemented as a conservative collector." ... "Support for a new memory management policy has been added by using a powerful conservative garbage collector, known as the Boehm-Demers-Weiser conservative garbage collector." ... And it is this performance boost Cocoa really needs. ... (comp.sys.mac.advocacy)
RE: C++ Garbage Collector on VMS? ... C++ Garbage Collector on VMS? ... It also seems to me that a solution is certainly not a good one when memory is not properly allocated and de-allocated by design and depends on system processes to compensate for poor programming practices.... there would be no need to dynamically allocate the ... (comp.os.vms)