The physics engine is not closed automatically. It must be closed by calling physX_destroy().

http://manual.3dgamestudio.net/physX_destroy.htm

Normally this happens automatically in the on_exit event in ackphysx.h, but if you don't use it, you must take care that your script closes the physics engine on exit. When you debug your script and terminate it with the red abort button, there is no clean-up and all open interfaces, including the physics engine, stay open. You need then to close SED for releasing all interfaces.