[Cocoa-sharp] Object.Retain()
Edward Carr
ecarr at lightshipinc.com
Sun Sep 10 15:19:48 EDT 2006
This was more of a question for the Cocoa experts out there. I'm not sure
that this should be done, which is why I was posing the question in the
first place. It seems like it should be; I just would like a little
verification first.
Edward Carr
-----Original Message-----
From: C.J. Adams-Collier [mailto:cjcollier at colliertech.org]
Sent: Sunday, September 10, 2006 2:03 AM
To: Edward Carr
Cc: cocoa-sharp at lists.ximian.com
Subject: Re: [Cocoa-sharp] Object.Retain()
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Memory management patches are good, so long as we ensure that the data
isn't released before everyone is done with it. Please submit a patch
against SVN head.
Cheers,
C.J.
Edward Carr wrote:
> 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
>
>
> _______________________________________________ Cocoa-sharp mailing
> list Cocoa-sharp at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/cocoa-sharp
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFA6qSbS8rWWzCfqgRAijpAKCr7thvt57GPGoPb9zFTAt1E9eYogCdH3LW
44POTqjBM3bMGeq1eLcnOQQ=
=VvjD
-----END PGP SIGNATURE-----
More information about the Cocoa-sharp
mailing list