Home All Groups Group Topic Archive Search About

Clear user control from memory

Author
23 Mar 2006 7:02 PM
Mike TI
Mar 23, 2006

Hi all

I am new to VB.Net. I am using VB.Net 2005.

I have built a Form with a Split Container Control. I am docking several
User Controls in one Panel based on request. I am using 'Show' and 'Hide'.

My question is that I want to remove a user control from memory instead of
hiding.

Thanks.

Author
24 Mar 2006 12:05 AM
I Don't Like Spam
Mike TI wrote:
Show quoteHide quote
> Mar 23, 2006
>
> Hi all
>
> I am new to VB.Net. I am using VB.Net 2005.
>
> I have built a Form with a Split Container Control. I am docking several
> User Controls in one Panel based on request. I am using 'Show' and 'Hide'.
>
> My question is that I want to remove a user control from memory instead of
> hiding.
>
> Thanks.
>

>
>

It will be released by the garbage collector once all references to the
form go out of scope.  So setting the reference to "nothing" should set
it ready to be collected.

Chris