I read a lot about how MT works, that it communicates with the iOS API, that it uses AOT compilation, that the iPhone does not have a .NET runtime, etc.
Jeff once wrote this in response to one of my questions, which shows how to bind an ObjC selector:
var url = new NSUrl ("http://www.google.com/");
var str = (NSString) Runtime.GetNSObject (Messaging.IntPtr_objc_msgSend_IntPtr (Class.GetHandle ("NSString"), Selector.GetHandle ("stringWithContentsOfURL:"), url.Handle));
But what happens under the hood if I do this? And does that mean if I use a call that is already connected, it will do something similar, like in the above code in the background, hiding it from me? Does this mean that every time some Selector.GetHandle () and Runtime.GetNSObject () commands are executed?
How was the entire MT project launched? At some point, the team must have thought: "We have ObjC and Mono here - how can we combine them?" I mean, what was the first thing that was done, tried?
And the last thing that happens with the garbage collector: I assume that it should run in a separate thread, but is it really ONE thred? Or are there several of them? How does the GC collector decide it's time to clean?
source
share