Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 29, 2015, 5:35:59 PM (9 years ago)
Author:
landauf
Message:

renamed SmartPtr to StrongPtr (now we have weak and strong pointers)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core7/src/libraries/core/CoreStaticInitializationHandler.cc

    r10542 r10555  
    102102            identifiers.insert(&static_cast<StaticallyInitializedIdentifier*>(*it)->getIdentifier());
    103103
    104         // destroy objects. some objects may survive this at first because they still have smart pointers pointing at them. this is
    105         // ok as long as those smart pointers are held by objects that are also about to be destroyed in the same loop. this means
    106         // that objects within one module may reference each other by smart pointers. but it is not allowed that objects from another
    107         // module (which is not unloaded) uses smart pointers to point at objects inside the unloaded module. this will lead to a crash.
     104        // destroy objects. some objects may survive this at first because they still have strong pointers pointing at them. this is
     105        // ok as long as those strong pointers are held by objects that are also about to be destroyed in the same loop. this means
     106        // that objects within one module may reference each other by strong pointers. but it is not allowed that objects from another
     107        // module (which is not unloaded) uses strong pointers to point at objects inside the unloaded module. this will lead to a crash.
    108108        for (std::set<Identifier*>::iterator it = identifiers.begin(); it != identifiers.end(); ++it)
    109109            (*it)->destroyObjects();
    110110
    111         // check if all objects were really destroyed. this is not the case if an object is referenced by a smart pointer from another
     111        // check if all objects were really destroyed. this is not the case if an object is referenced by a strong pointer from another
    112112        // module (or if two objects inside this module reference each other). this will lead to a crash and must be fixed (e.g. by
    113113        // changing object dependencies; or by changing the logic that allows modules to be unloaded).
Note: See TracChangeset for help on using the changeset viewer.