1. ?garbage collect??is a bug? - CSharp/C#
2. WIll GC.Collect() immediately collect garbage ?
WIll GC.Collect() immediately start a GC thread and clear all unreferenced objects from the heap ? Regards, Chak.
3. callback on a garbage collected delegate error - CSharp/C#
4. Garbage Collecting and real-time processing.
Hello, can someone please give me a tip or two on the following problem: I have a system of linked objects which stores properties of on-screen drawn objects. When i select each object on the screen the application slowly over 10-20 seconds grows slower, and the computer runs out of memory so the disk starts spinning and the garbage collector does its thing, problem is that the applicatoin requires a bit more real-time processing and the user gets a frozen screen for 2-3 seconds at a time if not more. Should i call the following code before someone clicks on my on-screen object so that i can release any previous allocated memory? GC.Collect(); GC.WaitForPendingFinilizers(); GC.Collect(); Is this the only way to "Hope/pray" for a speed up?
5. Does this code Force Garbage Collector to Collect - CSharp/C#
6. Object referenced by events can be garbage collected !
I have created a sample project where i have referenced an object only with an event : textBox.VisibleChanged += new EventHandler(this.textBox_VisibleChanged); When i call GC.Collect(), the object is disposed and garbage collected ! I thought that event references are strong references and not weak references. Does the .NET 2.0 garbage collector manage differently the events references ?
7. Objects don't get Garbage Collected - CSharp/C#
8. How to garbage collect an object?
In my quest to migrate a vb.net app to C# I encountered
the following problem:
session.Initialize("pwrd");
NotesDatabase NotesDB;
NotesDB = session.GetDatabase(server, filename, false);
...
//done with data pulling/processing
NotesDB = Nothing //from vb.net - not working for C#
What should I do about NotesDB = Nothing? If I set
NotesDB = null;
C# doesn't complain, but is this the way to do it?
Thanks,
Ron