Emptying the Controls collection prevents form from closing.

4

4Space

Why does disposing all of the controls and emptying the controls collection
in a form prevent it from closing?

At the minute we have the lovely choice of not destroying our controls and
having a major memory leak, or we destroy the controls, and find ourselves
unable to close the form.

Any advice appreciated.

Cheers,

4Space
 
S

Scot Rose [MSFT]

I am not sure what you mean, do you mean controls you added Dynamically? Do you have a small sample that reproduces the problem that I could take a look at here?

Scot Rose, MCSD
Microsoft Visual Basic Developer Support
Email : (e-mail address removed) <Remove word online. from address>

This posting is provided “AS IS”, with no warranties, and confers no rights.

Get Secure!
http://www.microsoft.com/security
http://www.microsoft.com/protect


--------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top