Hi,
I wish to create an instance of a class defined inside EW, but I want to create in C code (I'm unpacked a large data structure and want to use a pre-existing internal class to store the data and pass it into the application.
(For good reasons, I don't want to create an API call that takes multiple parameters - there are a lof ot them, and they may change - just a single API call that takes an instance of a data object.)
Looking at the source, I can see:
EwNewObjectIndirect(aClass, aArg)
This object is only expected to have a lifespan of the C call.
Are there any issues with doing the following:
1. Unpack the message coming in (It's on a serial line)
2. Use EwNewObjectIndirect to create an instance of my 'DataParameters' object.
3. Use the Set methods to update the object.
4. Pass the object reference into an AutoObject method (MyHandlerClass__HandleDataParameters(objectRef, myShinyNewObject)
5. The object will then use the data internally.
6. Gargabe collection removed the object next time.