[Mono-osx] [ANN] objc3-sharp
jesjones at mindspring.com
Mon Jun 9 18:53:20 EDT 2008
On Jun 9, 2008, at 11:32 AM, Laurent Etiemble wrote:
>> 1) In monobjc methods are called like this:
>> Class cls1 = Class.GetClassFromName("TestClass04");
>> int result = ObjectiveCRuntime.SendMessage<int>(cls1, "TestWithA:b:",
>> 789, 345);
> The syntax above is the one used internally (or in very specific
> cases). A method call can be as simple as:
> TestClass04 instance = new TestClass04();
> int result = instance.TestWithAB(789, 345);
Sure, but that's not how you call an arbitrary native method. It's
just a call to a wrapper method. Of course, I guess you have wrapped
all or most of Cocoa...
>> 4) monobjc doesn't seem to do anything to simplify reference
>> objc3-sharp relies on the GC to know when to release objects which
>> dramatically simplifies reference count management.
> As Monobjc is targeted to both Objective-C 1.0 and Objective-C 2.0,
> there is no link to the GC (maybe in the future). For the moment,
> reference counting is the way to go (it works the same as in
> Objective-C with retain/release).
Sorry, I wasn't very clear. What I meant was that instead of the
programmer claiming ownership of an object via a retain call the .NET
runtime itself claims ownership which it releases via Dispose or the
Objc3.NSObject finalizer. I'd like to experiment with using the native
GC though, it seems like it would be doable...
More information about the Mono-osx