title: Coverity Static Analysis UNINIT Error in C++
body: <p>I'm new to Coverity and lambdas and am trying to figure our what's causing the UNINIT error of &quot;creating a temporary&quot; and &quot;using uninitialized value <code>&lt;temporary&gt;.__f_.__buff_</code> when calling <code>~function</code>&quot;</p>
  <pre><code>class DeckProcess{
       
       void foo(){/*do stuff*/}
       
       std::unique_ptr&lt;Monitor&gt;     m_monitor;
       std::shared_ptr&lt;Controller&gt;  m_controller;
          
       void initStatusCheck(){
              //Constructor in different file
              //Monitor(const std::function&lt;void()&gt; &amp; name, param2, param3)
          
              m_monitor = std::unique_ptr&lt;Monitor&gt;(new Monitor([this](){
                                                       if(m_controller){
                                                                         m_controller-&gt;foo();
                                                                       }
                                                        }, arg2, arg3));     
       }
  }
  </code></pre>