Clear user control from memory

  • Thread starter Thread starter Mike TI
  • Start date Start date
M

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.
 
Mike said:
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
 
Back
Top