
Signature
Visita mi blog principal: http://rfog.blogsome.com
Y este sobre programación: http://geeks.ms/blogs/rfog
Libros, ciencia ficción y programación
========================================
Donde las dan las toman, y callar es bueno.
> Hello all!
>
> I've a bunch of forms that I create on app startup. But sometimes they
> are auto disposed. I don't understand why, because I instantiate them by
> gcnew and does not delete until app ends.
I think I've resolved the issue.
It is related to a Windows Forms timer, if form is closed and timer fires
and closes the form, the form is distroyed.

Signature
Visita mi blog principal: http://rfog.blogsome.com
Y este sobre programación: http://geeks.ms/blogs/rfog
Libros, ciencia ficción y programación
========================================
Donde las dan las toman, y callar es bueno.
Ben Voigt - 01 Jan 2007 16:43 GMT
>> Hello all!
>>
>> I've a bunch of forms that I create on app startup. But sometimes they
>> are auto disposed. I don't understand why, because I instantiate them by
>> gcnew and does not delete until app ends.
Because they are garbage collected objects, if they become unreachable, they
will be finalized and the memory reclaimed, even though you don't call
delete.
> I think I've resolved the issue.
>
> It is related to a Windows Forms timer, if form is closed and timer fires
> and closes the form, the form is distroyed.
RFOG - 02 Jan 2007 10:03 GMT
Is any way to elude this?
> Because they are garbage collected objects, if they become unreachable,
> they
[quoted text clipped - 13 lines]
>> ========================================
>> Donde las dan las toman, y callar es bueno.

Signature
Visita mi blog principal: http://rfog.blogsome.com
Y este sobre programación: http://geeks.ms/blogs/rfog
Libros, ciencia ficción y programación
========================================
Oye Patxi, ¿que le pasa a la mula que viene llorando?
Nada, que me ha pegado una coz y se la he devuelto.
Ben Voigt - 03 Jan 2007 15:57 GMT
> Is any way to elude this?
Make sure they stay reachable from a gc rooted object, like a static
variable in some class.
>> Because they are garbage collected objects, if they become unreachable,
>> they
[quoted text clipped - 13 lines]
>>> ========================================
>>> Donde las dan las toman, y callar es bueno.
RFOG - 03 Jan 2007 18:22 GMT
Yes, thank you.
:-)
>> Is any way to elude this?
>
[quoted text clipped - 26 lines]
>> Oye Patxi, ¿que le pasa a la mula que viene llorando?
>> Nada, que me ha pegado una coz y se la he devuelto.

Signature
Visita mi blog principal: http://rfog.blogsome.com
Y este sobre programación: http://geeks.ms/blogs/rfog
Libros, ciencia ficción y programación
========================================
La tragedia de la edad no es ser viejo, sino que se sea joven y la gente
no lo vea.
-- Andrés Segovia.