|Did you know ...||Search Documentation:|
The return value of PL_cleanup() is one of the following:
PL_CLEANUP_NO_RECLAIM_MEMORYwas specified this implies most of the memory was reclaimed and Prolog may be reinitialized in the same process using PL_initialise().
PL_cleanup() allows deleting and restarting the Prolog system in the same process. In versions older than 8.5.9 this did not work. As of version 8.5.9, it works for the basic Prolog engine. Many of the plugins that contain foreign code do not implement a suitable uninstall handler and will leak memory and possibly other resources. Note that shutting Prolog down and renitializing it is slow. For almost all scenarios there are faster alternatives such as reloading modified code, using temporary modules, using threads, etc.