[Mono-osx] Objective-C and Mono's GC
Yoav HaCohen
yoavhacohen at gmail.com
Tue Jan 13 18:29:21 EST 2009
You can use a standard dictionary to map between pointers and
GCHandle/RefCounter.
You can use delegates and function pointers to call managed functions from
the objective-c code (or any native c-code).
On Tue, Jan 13, 2009 at 10:10 PM, Martin Smith <martin.smith.jr at gmail.com>wrote:
> Hello,
>
> We are working on an application where we're embedding Mono in an
> Objective-C application. One of the issues that we're seeing is that if the
> GC does not "see" pointers that are stored in Objective-C objects. The side
> effect is that when we run our applications, the Obj-C objects will have
> instance variables that will eventually raise a SIGSEV
> (NullReferenceException) whenever the garbage collector runs.
>
> Does anyone else have experience with this problem? I know one of the
> things we could probably do is maintain a data structure that stores all the
> "live" mono pointers and then write smart pointer classes that explicitly
> maintained ref counts on these objects, but I'm wondering if there's an
> easier way.
>
> Thanks in advance,
> Martin
>
> _______________________________________________
> Mono-osx mailing list
> Mono-osx at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-osx
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-osx/attachments/20090114/b82f41da/attachment.html
More information about the Mono-osx
mailing list