[Mono-dev] problem about memory

huseyin cakir huseyin.cakir35 at gmail.com
Sun Apr 11 07:35:58 EDT 2010


We develop some applications with Mono and Gtk#...I have a question about
memory usage
in mono applications and approach we used in moving between windows...


Lets say we have;

*in test.cs:*
*
-----------------------------------------------------------------------------------------------
*
 * class  exampleTest : Window*
* **  {*
*...*
*  void test_Clicked(object sender, EventArgs e)*
* **  ** **  {*
* **  ** **  *
* **  ** **  ** *
* **  ** **  ** **exampleTest2  d=new exampleTest2 ();*
* **  ** **  ** **this.Destroy();*
*//** **  ** **  this.Dispose();*
*//** **  ** ** GC.SuppressFinalize(this);*
* **  ** **  }*
*
*
*}*
*
-----------------------------------------------------------------------------------------------
*
*and in test2.cs:*
*
*
*class  exampleTest2 : Window*
* **  {*
*...*
*
 void test_Clicked(object sender, EventArgs e)
     {


       exampleTest  d=new exampleTest();
       this.Destroy();
//      this.Dispose();
//     GC.SuppressFinalize(this);
      }
*
*}*

*
-----------------------------------------------------------------------------------------------
*

When we move between these two pages the memory usage is dramatically
increasing in time...we tried this.Dispose and other GC things as shown
above...
The question I want to ask is what is the best way to move between windows?
and
is this.Destroy(); the right method to really destroy window with all stuff
in it on memory?

Or something that we use is totally wrong please help!

-- 
Hüseyin Çakır

Web: http://huseyincakir.wordpress.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20100411/09ceae8f/attachment.html 


More information about the Mono-devel-list mailing list