CLHEP VERSION Reference Documentation
   
CLHEP Home Page     CLHEP Documentation     CLHEP Bug Reports

RCBase.cc
Go to the documentation of this file.
2 namespace Genfun {
4  : _count(0)
5 {
6 }
7 
8 
10 {
11 }
12 
13 
14 
15 void RCBase::ref() const
16 {
17  _count++;
18 }
19 
20 void RCBase::unref() const
21 {
22  if (!_count)
23  {
24 
25  }
26  else
27  {
28  _count--;
29  if (!_count)
30  delete this;
31  }
32 }
33 
34 unsigned int RCBase::refCount() const
35 {
36  return _count;
37 }
38 
39 } // namespace Genfun
virtual ~RCBase()
Definition: RCBase.cc:9
void unref() const
Definition: RCBase.cc:20
unsigned int refCount() const
Definition: RCBase.cc:34
void ref() const
Definition: RCBase.cc:15