[Cocoa-sharp] Object.Retain()

Edward Carr ecarr at lightshipinc.com
Sun Sep 10 01:20:20 EDT 2006


Here's a question for you...

In the MonoDoc example, Retain() is called on a Cocoa.String on line 338 of
MonoDoc.cs to make sure that Cocoa doesn't release the string before the
.NET Framework is finished with it.

My question is, shouldn't a Release be performed on this so that the String
isn't waiting until the application exits to be freed up? I'm thinking that
BrowserItem should implement the IDisposable interface, and Release the
"caption" string.

What do you guys think?

Edward Carr




More information about the Cocoa-sharp mailing list