I have downloaded the Adobe CS6 SDK. In the exporter example, inside exSelBeginInstance(), there are calls to "memory suite" API. This grabs some memory (at runtime) for a C-struct/array.
In my case, I need to call the new() operator on a derived C++ class. The idea is that I'll create the object during exSelBeginInstance(), then delete it during exSelEndInstance.
If I use the new() operator, then the memory-suite won't know about the object at all. Alternatively, I could call the memory-API to grab a chunk of memory the size of "sizeof(my_class)" But this doesn't work correctly either, because the object itself may need to create instances of other classes.
So is there a way to safely use dynamically created C++ objects inside an exporter plugin? Or do I have re-architect everything to avoid calling the new() constructor?
the adobe memory suite shouldn't be used for that sort of thing.
just use the new operator as you normally would.
the key is to store all the pointers to your dynamically allocated in the lRec (ie the private data) so that on EndInstance you can take responsibility for all of the delete(lRec->xxxxx) you need to do to properly clean up.