Disposing the form from where I am creating a object of new form & moving to that form RRS feed

  • Question

  • Hi All,

    Below are my environment details:

    .Net compact framework 3.5

    Windows Phone 6 Version

    Currently I have required where I need to visit from one form to another form on certain event or business flow. As my current form contains lots of image buttons, I dont want to just hide this form & move to another form because of memory issues. I want to make sure that I release all the memory which is occupied by the current form & then later move to the next form & show it. Please suggest me a better option to achieve this:

    Sample Code:




    Form2 frm2 = new Form2()


    this.close(); // Here I am sure this will not clear all my memory


    Also the reason why I want to clean the memory or set it to dispose so that CLR can clean it, this because I have lot of other forms with different flow.

    Appreciate your help



    .Net Developer

    Friday, October 18, 2013 6:56 AM