dotgnu-pnet
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pnet-developers] Need help for debugging GC handling WeakReferences


From: Heiko.Weiss
Subject: [Pnet-developers] Need help for debugging GC handling WeakReferences
Date: Thu, 16 Mar 2006 07:59:03 +0100

Hi All,
 
We have a problem here,  <<WeakReference.zip>> our app is loosing
memory.

What we do:

We have a class:

Class X : System.Windows.Forms.Control {
}

All our GUI objects are derived from this class.
If a class is created, we keep a WeakReference on it in a list.

Now we put this this controls in a Form.

Even if I only create a new Form (with some of our objects on it) and do
Form.Dispose() without showing it, the objects does not get Disposed.

A've attached a small sample.

Every time U press the test button, a new form "Form2" is created, and a
new WeakReference is added in a list.
The Form1 shoes the count of the alive Weaks.
Now when U close all of the Form2, the count of the WeakReferences
should go to 0.
That's what it does on Windows. But not woth pnet.
So the Form 2 never gets disposed.


PLEASE HELP.

Thx a lot


Cheers 
        Heiko (Brubbel)

Attachment: WeakReference.zip
Description: WeakReference.zip


reply via email to

[Prev in Thread] Current Thread [Next in Thread]