[Mono-osx] Memory Leak ?

Matthew Hazlett hazlema at gmail.com
Sun Jan 9 13:52:32 EST 2011


I made a terribly simple application, on the MainWindow I put a label 
then in the code I had it update the label every 1000 of a second.

         ...
        Timer t = new Timer(1000);
         ...

         public override void AwakeFromNib ()
         {
             base.AwakeFromNib ();

             t.Elapsed += delegate {
                 txtClock.StringValue = DateTime.Now.ToLongTimeString();
             };

             t.Start();
         }

But it keeps throwing warning errors at me for every tick, what am I 
missing and how do I fix it?
/2011-01-09 13:47:30.563 UglyClock[79395:7103] *** 
__NSAutoreleaseNoPool(): Object 0x540f80 of class NSCFString 
autoreleased with no pool in place - just leaking/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-osx/attachments/20110109/dbd32b16/attachment.html 


More information about the Mono-osx mailing list