By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,238 Members | 1,532 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,238 IT Pros & Developers. It's quick & easy.

Clear user control from memory

P: n/a
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.


Mar 23 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a

Dim c As Control
c.Dispose()

Mike TI ha scritto:
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.


Mar 23 '06 #2

P: n/a
Mike TI wrote:
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
Mar 24 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.