I am creating a CScriptArray instance and returning it to the script as shown at the bottom of this page: http://www.angelcode.com/angelscript/sdk/docs/manual/doc_addon_array.html
The script function that receives this is registered like:
scriptEngine->RegisterGlobalFunction("body& duplicate(const body &in)", asFUNCTION(duplicate_bodies), asCALL_CDECL);
On MacOS, after using this function and then exiting the program I see the "GC cannot free an object of type 'array'" message. Just wondering if I'm doing something wrong, and if I can avoid this somehow.