Kill Form Compact Framework

Posted on 2004-11-18
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.

Form2 myForm2 = new Form2();
//This is not releasing the form object from Memory
Question by:jbrashears
    LVL 1

    Expert Comment

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

    Author Comment

    This is in a button click event  on form1
    LVL 2

    Expert Comment

    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()
    LVL 1

    Accepted Solution

    I tried it in an emulator and It worked fine.  So, it probably just hasen't performed a garbage collection yet, as above.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    Introduction                                                 Was the var keyword really only brought out to shorten your syntax? Or have the VB language guys got their way in C#? What type of variable is it? All will be revealed.   Also called…
    This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    745 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

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now