simulOS | OS
This unit of program contains OS class which is called by main. It instantiates exactly one instances of FileSystem and Shell, and they are both dependent on the OS.
When an instance of OS is created, it calls its start function which calls Shell::startSession() which starts interactive session for a user. When Shell session is closed by a user, the OS instance calls stop.
After it, before the main function stops, OS calls its de-constructor which first deletes the Shell instance (this order is safe) followed by the removal of the FileSystem instance.