?
Solved

Kill Form Compact Framework

Posted on 2004-11-18
4
Medium Priority
?
254 Views
Last Modified: 2012-06-27
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();
0
Comment
Question by:jbrashears
  • 2
4 Comments
 
LVL 1

Expert Comment

by:adambutt
ID: 12621045
Where is  this code?  Is it in a static context, or is it being run by instanciated code.  Is it in Form 1?
0
 

Author Comment

by:jbrashears
ID: 12621056
This is in a button click event  on form1
0
 
LVL 2

Expert Comment

by:acharbonneau
ID: 12621154
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
 
LVL 1

Accepted Solution

by:
adambutt earned 500 total points
ID: 12621182
I tried it in an emulator and It worked fine.  So, it probably just hasen't performed a garbage collection yet, as above.
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses
Course of the Month15 days, 4 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question