This code appears to produce a memory leak on windows, but not on linux.
What gives?
 
Thanks in advance.
Jim
 
using System;
using System.Text;
using Gtk;
 
namespace Test
{
    class Test
    {
 
        static void Main(string[] args)
        {
            
            Gtk.TreeStore ts = new TreeStore(typeof(string), typeof(string[]));
            Gtk.TreeView tv = new TreeView();
            tv.Model = ts;
 
            while (true)
            {
                string temp = "Name";
                string[] saArray = new string[2];
                saArray[0] = "first";
                saArray[1] = "last";
                ts.AppendValues(temp, saArray);
                //ts.AppendValues(temp);
 
                long memalloc = GC.GetTotalMemory(true);
                Console.WriteLine("Memory usage: {0}", memalloc.ToString());
                Console.WriteLine();
                Console.WriteLine("press enter to continue");
                Console.ReadLine();
 
                
                ts.Clear();
 
            }
        }
    }
}
_______________________________________________
Gtk-sharp-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Reply via email to