title: Good or Bad C++ Idiom - Objects used purely for constructor/destructor?
body: <p>I have a few classes which do nothing except in their constructors/destructors. Here's an example</p>
  
  <pre><code>class BusyCursor 
  {
    private:
      Cursor oldCursor_;
  
    public:
  
      BusyCursor()
      {
        oldCursor_ = CurrentCursor();
        SetCursor(BUSY_CURSOR);
      }
      ~BusyCursor()
      {
        SetCursor(oldCursor_);
      }
  }
  
  // example of use
      void DoSlowThing
      {
        BusyCursor busy;
        ... do something time-consuming  ...
      }
  </code></pre>
  
  <p>I'm a little concerned about future readability. Am I being too "tricksy" here, with a variable ("busy") which is never actually used in the code? Could some static analysis tool suggest they be removed, or is this idiom sufficiently common not to worry about?</p>