File size: 370 Bytes
158b61b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// -*- c++ -*-
#include <iostream>
#include <boost/smart_ptr/intrusive_ptr.hpp>
#include "generic/threading/ug_ref_counter.h"

using namespace std;

class X : public Moses::reference_counter
{
public:
  X() { cout << "hello" << endl; }
  ~X() { cout << "bye-bye" << endl; }
};

int main()
{
  boost::intrusive_ptr<X> i(new X);
  // i.reset();
  cout << "bla" << endl;
}