Kill Form Compact Framework

I have 2 forms, i want to call Form2 from Form1 and then take Form1 out of memory I tried to use Form1.Dipose() but it still is listed as a running form in the process list on the PPC Memory Settings.

Code:
Form2 myForm2 = new Form2();
myForm2.Show;
//This is not releasing the form object from Memory
Form1.Dispose();
jbrashearsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

adambuttCommented:
Where is  this code?  Is it in a static context, or is it being run by instanciated code.  Is it in Form 1?
0
jbrashearsAuthor Commented:
This is in a button click event  on form1
0
acharbonneauCommented:
The .NET CLR provides nondeterministic garbage collection, which means that all bets are of in terms of when an object will actually be released from memory.  You can force the garbage collector to run by calling GC.Collect()
0
adambuttCommented:
I tried it in an emulator and It worked fine.  So, it probably just hasen't performed a garbage collection yet, as above.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.