[Mono-dev] Embedded: storing extra data on objects?

David Mitchell dmitchell at logos.com
Mon Mar 30 12:49:00 EDT 2009


When embedding mono, is there a way to store a little bit of extra
information (pointer-sized) along with a MonoObject (or similar structure)?

My scenario is that I have unmanaged wrappers for managed objects, and I¹d
like to ensure that there is never more than one unmanaged wrapper per
object (and also be able to get the unmanaged wrapper if all I have is the
object). I¹m sure I know that I could use a hash table for this, and that
may end up being what I do, but actually storing the pointer on the
MonoObject seems more natural, in my case.

A related question: if this isn¹t possible, would a patch to facilitate
scenarios like mine be welcomed, or is it something that the community is
thoroughly disinterested in?

--Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20090330/df7471d2/attachment.html 


More information about the Mono-devel-list mailing list