Boost Users :
Subject: Re: [Boost-users] statechart comparison
From: Andreas Huber (ahd6974-spamboostorgtrap_at_[hidden])
Date: 2009-04-01 11:33:41
> Is it still the case that boost statecharts require allocation and
> destruction of a state object when entering and exiting that state?
More precisely, the library issues "new State" upon state entry & and "delete State" upon state exit. So state construction & destruction *are* required but calls to global operator new and delete are not. The latter can be avoided by replacing operator new for your states or, on a more general level by passing a custom allocator to the state machine.
Boost.Statechart was designed for reactive systems, where state machines are often serviced by dedicated threads. In such a scenario, the inter-thread communication usually introduces a much higher overhead than state construction & destruction.
-- Andreas Huber When replying by private email, please remove the words spam and trap from the address shown in the header.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net