Changeset 57:67db2d359944 in rrlib_util


Ignore:
Timestamp:
17.06.2012 12:45:59 (7 years ago)
Author:
Tobias Föhst <foehst@…>
Branch:
default
Children:
58:85175cb69afa, 59:b7d576f653e4
Phase:
public
Message:

Backed out changeset f56c9eff6139

  • Identification of destroyed singleton instances can already be done by catching exceptions
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • make.xml

    r56 r57  
    1111      tAutoRegister.h 
    1212      tDoubleDispatcher.h 
     13      tTime.cpp 
    1314      tTypeList.h 
    1415      type_list/* 
  • patterns/singleton/tSingletonHolder.h

    r56 r57  
    9191  } 
    9292 
    93   static bool Destroyed() 
    94   { 
    95     return DestroyedVariable(); 
    96   } 
    97  
    9893//---------------------------------------------------------------------- 
    9994// Private fields and methods 
     
    113108      { 
    114109        TLifetimePolicy<T>::OnDeadReference(); 
    115         tSingletonHolder::DestroyedVariable() = false; 
     110        tSingletonHolder::Destroyed() = false; 
    116111      } 
    117112      tSingletonHolder::InstancePointer() = TCreationPolicy<T>::Create(); 
     
    125120    TCreationPolicy<T>::Destroy(tSingletonHolder::InstancePointer()); 
    126121    tSingletonHolder::InstancePointer() = 0; 
    127     tSingletonHolder::DestroyedVariable() = true; 
     122    tSingletonHolder::Destroyed() = true; 
    128123  } 
    129124 
     
    134129  } 
    135130 
    136   static bool &DestroyedVariable() 
     131  static bool &Destroyed() 
    137132  { 
    138133    static bool destroyed = false; 
Note: See TracChangeset for help on using the changeset viewer.