Re: Delegates and C++ FFI lifetimes

2020-07-03 Thread Kagamin via Digitalmars-d-learn
You can store the delegate in an array and invoke it by index.

Delegates and C++ FFI lifetimes

2020-07-02 Thread IGotD- via Digitalmars-d-learn
I have this runtime written in C++ that allows callbacks for various functionality. In C++ the callbacks are stored as a function pointer together with a void* that is passed as first argument. The void* can be a lot of things, for example the class pointer in C++. However, this is a bit