Changeset 2778


Ignore:
Timestamp:
Jul 19, 2012, 2:53:17 AM (9 years ago)
Author:
Peter
Message:

mark SmartPtr? as internal and point to boost::shared_ptr

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/utility/SmartPtr.h

    r2119 r2778  
    66/*
    77  Copyright (C) 2008 Jari Häkkinen, Peter Johansson
     8  Copyright (C) 2012 Peter Johansson
    89
    910  This file is part of the yat library, http://dev.thep.lu.se/yat
     
    3637     how many owners there are. When the counter reaches zero, the
    3738     pointer is deleted.
     39
     40     \internal This is an internal class kept for backward
     41     compabitility. User are adviced to use <a
     42     href="http://www.boost.org/doc/libs/1_50_0/libs/smart_ptr/shared_ptr.htm">
     43     boost::shared_ptr</a>.
    3844  */
    3945  template<typename T>
    40   class SmartPtr 
     46  class SmartPtr
    4147  {
    4248  public:
     
    6470    */
    6571    explicit SmartPtr(T* p=NULL, bool owner=true)
    66       : pointee_(p) 
     72      : pointee_(p)
    6773    {
    6874      if (owner)
     
    8187        ++(*ref_count_);
    8288    }
    83    
     89
    8490    /**
    8591       \brief Destructor
     
    134140        if (!--(*ref_count_))
    135141          delete pointee_;
    136     }     
     142    }
    137143  };
    138144
    139  
    140 
    141 
    142 
    143 
    144145}}} // of namespace utility, yat, and theplu
    145 
    146146#endif
Note: See TracChangeset for help on using the changeset viewer.