EDIT : Currently, I have created a workaround for the multiple functions that need to be exported. I am using the same mexFunction function with an additional input parameter which specifies which of the events needs to be executed.
Now, I have come to a point where I need memory to be static across multiple calls of the mexFunction since we need to use the same memory allocated in the first connect call in order to avoid memory leak. Does anyone have any thoughts on this?
