[Mono-osx] Memory Leak ?
hazlema
hazlema at gmail.com
Sun Jan 9 15:29:29 EST 2011
Ok, after much searching and trial and error I found this..
We handle the NSAutoreleasePool for you on the main thread, but
when you spin up threads that touch obj-c objects, you need to manage
the pool yourself.
so, when I do the delegate its in another thread. To get around this I just
add a little coco-esc cleanup.
t.Elapsed += delegate {
using (NSAutoreleasePool pool = new NSAutoreleasePool()) {
txtClock.StringValue = DateTime.Now.ToLongTimeString();
}
};
Hope this helps someone.
--
View this message in context: http://mono.1490590.n4.nabble.com/Memory-Leak-tp3206211p3206281.html
Sent from the Mono - OSX mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-osx/attachments/20110109/84c1bd03/attachment.html
More information about the Mono-osx
mailing list