Hello
There are multiple threads(a, b, c etc.) about the fact that Clear() ing items in the .NET component containers does not Dispose them(by calling Dispose(true).
Most frequently, IMHO, the Clear-ed components are not used anymore in the application, so it needs explicitly be Disposed after Clearing them from the parent containers.
...
Hello All
One of my friend told me that dynamic method is the only way if you want to at run time construct code that can be garbage collected.
One question in my mind that how garbage collector garbage the object which generated using reflection?
...
I'm mainly wondering about the affect that garbage collection would have on performance. Is the use of garbage collection frowned upon for release apps?
Another concern that I can think of is that using garbage collection could lead to sloppier programming.
Do you use garbage collection in your apps?
...
I have a perm gen memory leak, that I know. Profiling using jvisualvm shows that when doing hot deployment (e.g. stop and start an application without killing the JVM, in tomcat, WebSphere, WebLogic etc) - the PermGen space is constantly increasing.
After reading, using jhat, and other advanced tools I realized that I probably have a re...
the question is why we need to call dispose() on some objects?
why doesnt the garbage collector collect the object when it goes out of scope?
i am trying to understand the reason why it was implemented like that.
i mean it would be easier if object when the garbage collector collected out of scope objects.
thanks
...
Hi
I am working my way through Ferret (Ruby port of Lucene) code to solve
a bug. Ferret code is mainly a C extension to Ruby. I am running into
some issues with the garbage collector. I managed to fix it, but I
don't completely understand my fix =) I am hoping someone with deeper
knowledge of Ruby and C extension (this is my 3rd day wit...
This may likely be an issue with my inexperience using a Managed Language. The issue essentially is a loop within an objects method, which executes over about 20 seconds, throughout the duration of this loop the programs overall memory usage constantly goes up. Now all the variables within the loop which are modified are variables define...
Exposition:
In general, Reference Counting has the weakness of "it can't detect loops." However, in some cases, Reference Counting is really useful:
class EmergencyPatient {
DoctorPtr doctor;
EmergencyPatient() { doctor = Doctor::acquire(); }
~EmergencyPatient() { Doctor::release(doctor); }
};
Now, in a reference counted world...
What guarantees are the for the garbage collector?
From my research I have managed to find:
If there is still a reference to the memory it will not be garbage collected
If there is no reference:
When it is GC is non deterministic
When the GC kicks in the finalizer will be run before memory is released.
There is no guarantee about the...
Hi,
I have a very complex function in as3. The function is composed of many other functions which are nested inside of it. The main function has variables and all it's nested functions also have their own variables. Some of the nested functions are called by events that were added in the main function or in another nested function.
Now...
I have a library which returns a hierarchical list composed of IDictionary, IList and primitive types (string, and ints). At present I cannot change how this data is returned.
I have another strongly typed class which is consuming this data and converting it into business objects. There is a list of "properties" in the data returned, wh...
My CF application has a very customized UI, using lots of images as UI elements. The UI feels a lot more smooth when these bitmaps are kept in memory. When they're loaded on demand, the UI is slow and I can see the buttons appearing one by one, which looks very poor.
For a long time this went pretty well, but recently I've found the appl...
We have a situation where we are considering forcing a garbage collection on a server that is very low on RAM (3.6/4GB used on average). No, it's not really an option to upgrade this server unfortunately.
One of our service processes (written indirectly in C++ (don't ask...)) does work with the .NET components and then sleeps for 10 min...
Per-frame I need to allocate some data that needs to stick around until the end of the frame.
Currently, I'm allocating the data off a different memory pool that allows me to mark it with the frame count. At the end of the frame, I walk the memory pool and delete the memory that was allocated in a particular frame.
The problem I'm runn...
Does .NET have something similar to Java's garbage collection log? I want to write GC stats to a log in a production application. Google doesn't tell my anything useful and SO doesn't seem to have any related questions either.
Thanks
...
I am working in Delphi 5 (with FastMM installed) on a Win32 project, and have recently been trying to drastically reduce the memory usage in this application. So far, I have cut the usage nearly in half, but noticed something when working on a separate task. When I minimized the application, the memory usage shrunk from 45 megs down to...
Will the pointer to an object go to nil when its count goes to 0 or when dealloc is called? Why or why not?
...
Ive been using the loader a lot of upload images into my movieclip. But the only way I know how to do it is load the content, add an event listener, wait for it to finish finish the job in the handler using the reference to the loader like this.
protected function loadImage(imageDir:String):void
{
loader:Loader = ne...
Suppose I have a class structure like the following, where I have a temporary child that is displayed and later replaced and as such no longer needed. However as multiple methods access that child before, I need it to be a class variable.
So after replacing that child, I no longer need it and want to allow the garbage collection to reus...
Hi.
Just to clarify a point I seen here indirectly answered:
Is the best GC to use on multi-CPU / multi-Core machine, which mostly runs the application, is ConcurrentMarkSweeper (aka -XX:+UseConcMarkSweepGC)?
Also, there is something called G1, any idea when it will become available for Java6 ?
EDIT:
I'm using Sun Java VM, 1.6.0_16-b...