Open
Description
When generating managed wrappers for pure virtual functions the generated code ALWAYS "calculated" the pointer for the slot and generates a delegate wrapper (using Marshal.GetDelegateForFunctionPointer
) for every single call... (in CSharpSources.cs)
Unless I'm completely out of my depth, this is a rather expensive call that could/should be cached when the wrapper object is new'd up...
Is there a reason for this weird behavior?
Would a pull request adding a caching layer be welcomed?
If so, should the existing behavior be made optional? default?
I would appreciate any sort of feedback, esp. a one explaining to me if/how I'm not grasping the situation...