Original date:2015-01-04 10:44:04 Edited by: PeteE Subject: Re: Try/Catch

dcuny said...
  • Ensuring resources are properly cleaned up; and


The issue of releasing resources is what finally is all about. The cited paper seems to be suggesting something along the lines of how Go handles resources, by pushing deferred cleanup onto a stack.


It feels a bit sloppy to put the cleanup in the finally block, but it does allow you multiple exits with the guarantee that the cleanup code gets called.


Except, of course, that Euphoria doesn't have proper dtors, which makes it interesting to try to wrap libraries like wxWidgets.

To solve the cleaning up resources issue, have a look at delete_routine() that was added in OE4; it does allow you add a destructor routine to an existing object.

Not Categorized, Please Help


Quick Links

User menu

Not signed in.

Misc Menu