The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 4,262 other subscribers

Delphi – Defer defines the “postpone procedure” pattern to execute code at the end of a method

Posted by jpluimers on 2018/09/06

Last year, I stumbled upon [WayBack] Defer defines the “postpone procedure” pattern, this postpone should schedule a “procedure: TProc” to run it after the end of the caller method… – Cesar Romero – Google+ that points to this repository:

https://github.com/cesarliws/foundation-4-delphi

Some people like this usage of the RAII pattern, but I do like it even though I do not use it very often. The implementation better than my TAnonymousMethodMemento in Delphi: a memento that executes any code at end of method for various reasons:

Now the documentation could use more English (some of it is in Portuguese).

–jeroen

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.