H
Howard Weiss
I am writing a Managed C++ application.
In my application, I create a modeless sub-form using New. I retain a
pointer to this sub-form in my application.
If the user closes this form, my pointer is still valid. If I interrograte
the instance of the sub-form, the IsDisposed attribute is set.
I want to recreate the sub-form. To do so, I call new again and set my
pointer to the new instance of the sub-form.
What happens to the memory allocated to the old instance of the sub-form? I
am hoping that the framework is keeping reference counts and recognizes when
the old instance is no longer needed and eventually garbage collects the
data.
Can someone verify that this indeed occurs?
Howard Weiss
In my application, I create a modeless sub-form using New. I retain a
pointer to this sub-form in my application.
If the user closes this form, my pointer is still valid. If I interrograte
the instance of the sub-form, the IsDisposed attribute is set.
I want to recreate the sub-form. To do so, I call new again and set my
pointer to the new instance of the sub-form.
What happens to the memory allocated to the old instance of the sub-form? I
am hoping that the framework is keeping reference counts and recognizes when
the old instance is no longer needed and eventually garbage collects the
data.
Can someone verify that this indeed occurs?
Howard Weiss