-
- Downloads
Replace TClassRef list with a persistent TClass**
TClass objects can be created as a result of opening a TFile (in which they are in emulated mode) or as a result of loading the dictionary for the corresponding class. When a dictionary is loaded any pre-existing emulated TClass is replaced by the one created/coming from the dictionary. To have a reference that always point to the 'current' TClass object for a given class, one should use a TClassRef. TClassRef works by holding on to the fPersistentRef which is updated atomically whenever a TClass is replaced. During the replacement the value of fPersistentRef is set to zero, leading the TClassRef to call TClass::GetClass which is also locked by the replacement. At the end of the replacement, fPersistentRef points to the new TClass object. Conflicts: bindings/pyroot/src/FunctionHolder.cxx core/meta/inc/TClass.h core/meta/src/TClass.cxx
Showing
- bindings/pyroot/src/TFunctionHolder.cxx 1 addition, 1 deletionbindings/pyroot/src/TFunctionHolder.cxx
- core/meta/inc/TClass.h 45 additions, 26 deletionscore/meta/inc/TClass.h
- core/meta/inc/TClassRef.h 13 additions, 12 deletionscore/meta/inc/TClassRef.h
- core/meta/src/TClass.cxx 71 additions, 44 deletionscore/meta/src/TClass.cxx
- core/meta/src/TClassRef.cxx 18 additions, 32 deletionscore/meta/src/TClassRef.cxx
Loading
Please register or sign in to comment