No, the only issue I had at first was not holding a strong reference to them (so they would get garbage collected instantly - I just stored a reference in the Variable class and it worked perfectly). I think you may be spot on regarding the calling convention, I am working on .NET 4, x64 processor, so the calling convention would be different. I will have to try out your version! Really nice renders by the way
Thanks. It's the one from Sean O'Neill
Hmmm, yeah garbage collecting is the problem mentioned throughout the posts I found. Hopefully more people gonna play with this on different runtimes and platforms.
BTW I see you've changed around the type semantics a bit. I will definitely need to check it out tomorrow - I am not really happy with my current approach, but I wasn't really sure how to make the wrapper work properly for every variable type without resorting to ugly casts to and from Object. So your generic approach looks a lot better..
I wonder if one could come up with a super clean design for generic attributes at all
. Runtime polymorphism for "all there is" ? Either you have wrappers for every type or functions for every type, and a cast hides always somewhere
. But the generic layer makes the subsequent wrappers a bit more concise.