00001 // -*- c++ -*- 00002 #include <iostream> 00003 #include <boost/smart_ptr/intrusive_ptr.hpp> 00004 #include "generic/threading/ug_ref_counter.h" 00005 00006 using namespace std; 00007 00008 class X : public Moses::reference_counter 00009 { 00010 public: 00011 X() { cout << "hello" << endl; } 00012 ~X() { cout << "bye-bye" << endl; } 00013 }; 00014 00015 int main() 00016 { 00017 boost::intrusive_ptr<X> i(new X); 00018 // i.reset(); 00019 cout << "bla" << endl; 00020 }