[Mono-dev] Mono 2.8.2 GC
huseyin cakir
huseyin.cakir35 at gmail.com
Fri Feb 25 17:13:27 EST 2011
No our platform depends on mono but i can post you the code block whether to
ask there is an logical error here?
*
-----------------------------------------------------------------------------------
Page 1:*
using System;
using Gtk;
namespace test
{
class Page1 : Fixed
{
Button btn1;
Image img1;
Gdk.Pixbuf px1;
public Page1()
{
btn1=new Button("go Page2");
px1=new Gdk.Pixbuf("4991.gif");
img1=new Image(px1);
btn1.Clicked+= new EventHandler(btn1_Clicked);
this.Put(btn1,10,10);
this.Put(img1,10,50);
}
void btn1_Clicked(object sender, EventArgs e)
{
freeItems();
Page2 pg2=new Page2();
Test.win.Add(pg2);
Test.win.ShowAll();
}
void freeItems()
{
px1.Dispose();
img1.Dispose();
img1.Destroy();
btn1.Dispose();
btn1.Destroy();
Test.win.Remove(this);
this.Dispose();
this.Destroy();
}
}
}
*
-----------------------------------------------------------------------------------
Page 2:*
using System;
using Gtk;
namespace test
{
class Page2 : Fixed
{
Button btn1;
Image img1;
Gdk.Pixbuf px1;
public Page2()
{
btn1=new Button("go back page 1");
px1=new Gdk.Pixbuf("4991.gif");
img1=new Image(px1);
btn1.Clicked+= new EventHandler(btn1_Clicked);
this.Put(btn1,10,10);
this.Put(img1,10,50);
}
void btn1_Clicked(object sender, EventArgs e)
{
freeItems();
Page1 pg1=new Page1();
Test.win.Add(pg1);
Test.win.ShowAll();
}
void freeItems()
{
px1.Dispose();
img1.Dispose();
img1.Destroy();
btn1.Dispose();
btn1.Destroy();
Test.win.Remove(this);
this.Dispose();
this.Destroy();
}
}
}
On Sat, Feb 26, 2011 at 12:02 AM, Stifu <stifu at free.fr> wrote:
>
> Could you check if you see the same memory usage when running your app with
> .NET?
>
>
> huseyin cakir wrote:
> >
> > we have just installed 2.8 and checking the performance differences with
> > 2.0
> > but does the GC really deals with gtk# memory leaks in 2.10 because this
> > the
> > only problem we got in our developments.
> >
> > I mean we use one window widget and change fixed widget in it to use
> > memory
> > effectively and dispose destroy all widgets inside it(for example button
> > widget). Is there another way to make less memory usage?
> >
> > *for example:*
> >
> > to navigate between two pages without memory consumption we use a method
> > like below:
> >
> > fixed A fixed B
> > ---------------------------
> > window A
> >
> > add fixed A in window A with other widgets like button widget
> >
> > remove fixed a
> >
> > dispose destroy fixed A with its children
> >
> > and add fixed B
> >
> >
> > but it still increases in time please help about this issue we have Thank
> > you.
> >
> > On Fri, Feb 25, 2011 at 11:03 PM, Miguel de Icaza <miguel at novell.com>
> > wrote:
> >
> >> Hello,
> >>
> >> > well I have a 64mb ram want to use a GC parameter that will stop
> >> > continuously incerasing memory usage. I use some gtk# widgets that I
> >> dispose
> >> > & destory but the memory still increases?
> >> >
> >> > starting with %72 and after some gtk# widget usage it continuosly
> >> > incerases...
> >>
> >> Consider using Mono 2.10 and the new profiler to determine if there is
> >> a memory leak in your code.
> >>
> >> miguel
> >>
> >
> > _______________________________________________
> > Mono-devel-list mailing list
> > Mono-devel-list at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-devel-list
> >
> >
>
> --
> View this message in context:
> http://mono.1490590.n4.nabble.com/Mono-2-8-2-GC-tp3307506p3325279.html
> Sent from the Mono - Dev mailing list archive at Nabble.com.
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20110226/e31fec29/attachment-0001.html
More information about the Mono-devel-list
mailing list