I inherited the code for a c++ SketchUp plugin, with the usual Ruby loading process. The c function Init_sketchupplugin() does run, and the commands it maps run as they should.
extern “C” __declspec(dllexport)
mSUEX_MyApp = rb_define_module(“SUEX_MyApp”);
rb_define_module_function(mSUEX_MyApp, “do_license”, VALUEFUNC(DoLicense), 0);
rb_define_module_function(mSUEX_MyApp, “do_about”, VALUEFUNC(DoAbout), 0);
Now need to know when SketchUp is closing, so I can have my plugin free up memory it no longer needs. Do I need to put some specific code in my loader, or a specially name function in my c code?