[Oberon] Oberon for a C++ user.

Skulski, Wojciech skulski at pas.rochester.edu
Sat Nov 12 01:29:02 CET 2016


Lars:

>How did they decide on order of finalization in a multi module project? 
> What if finalization calls code, from a module that's already unloaded?

The modules can be unloaded in the reverse import order. The idea is that the lower level (imported) modules are servers. If a server is imported then it cannot be unloaded. It is closely related to the other thread "Safe unloading". Your concerns were addressed by Andreas.

I guess you can perhaps devise a devious example where a top level module installs a procedure variable (a "hook") in the lower level module, and this causes chaos upon finalization. I am guessing that Andreas has fixed that. Barring such deviousness, the finalization is intended to deal with freeing resources such as files or communication channels. Its use should be restricted to such straightforward cases. 

I am not sure if we need to worry about hundreds of modules at this point.

Wojtek



More information about the Oberon mailing list