Jump to content
The simFlight Network Forums

Recommended Posts

  • Replies 54
  • Created
  • Last Reply

Top Posters In This Topic

Posted

Just test and the __gc are still not called with this version.

If I let the script ends by itself, I mean not adding a blocking event.offset(...), the __gc are properly called.

I'll change my moduleso that people can handle script interruption with your event.terminate() method.

Anyway, thank you very much Pete.

Posted

Just test and the __gc are still not called with this version.

So "lua_close" does no garbage collection? That makes no sense at all! :-(

I've no idea whatsoever how to force garbage collection otherwise, and according to everything I've read it isn't necessary for me to do so. Lua tidies up after itself.

If I let the script ends by itself, I mean not adding a blocking event.offset(...), the __gc are properly called.

Ah, if it's waiting for an event it is not processing any of the "Abort" flag settings! That is why!

I never thought of that, sorry. I tested on looping plug-ins only. If it's waiting on any event it is easier. i can simply call lua_close instead of an event function!

Tomorrow ...

Pete

Posted

i can simply call lua_close instead of an event function!

Okay, Done. Please try these and let me know:

FSUIPC 3.997e

FSUIPC 4.715a

BTW the alternative, using the event.terminate function, could simply call ipc.exit, which would do the lua_close, which should call all your __gc functions. But if that's all it was doing it would be a waste -- quicker to let this abort method do the same.

Regards

Pete

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.