Boost logo

Boost Users :

From: Jason House (jhouse_at_[hidden])
Date: 2005-06-23 16:28:35

I have the contents of a shared pointer getting corrupted by a default
constructor of another object. My best guess as to how this could be
happening is that I am using references to shared pointers for coding

Is it possible for code like the following to cause a problem?

   boost::shared_ptr<my_class> &x = a.b.c.d.e.f.g;
   if (x.get() == NULL)
     { pointer_empty(); }
     { other_actions(x->get()); }

PS: I found this in a header file (#define BOOST_VERSION 103000)

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at