[swift-users] module (de)-initialization

Jens Alfke jens at mooseyard.com
Tue Dec 20 10:54:14 CST 2016

Also, AFAIK there is no mechanism in Swift (yet) to load or unload a module at runtime, so a module load occurs when the program starts up, and an unload occurs when the program exits. 

So if your module really needs to do something to clean up, it could call the (C standard) function atexit() to install a callback.


More information about the swift-users mailing list