Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 4, 2015, 9:12:21 PM (9 years ago)
Author:
landauf
Message:

merged branch core7 back to trunk

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/libraries/core/object/Context.cc

    r9667 r10624  
    7676    /*static*/ void Context::setRootContext(Context* context)
    7777    {
    78         if (Context::rootContext_s)
    79             delete Context::rootContext_s;
    8078        Context::rootContext_s = context;
     79    }
     80
     81    /*static*/ void Context::destroyRootContext()
     82    {
     83        delete Context::rootContext_s;
     84        Context::rootContext_s = NULL;
    8185    }
    8286
    8387    /*static*/ Context* Context::getRootContext()
    8488    {
    85         if (!Context::rootContext_s)
    86             Context::rootContext_s = new Context(NULL);
     89        OrxVerify(Context::rootContext_s != NULL, "Root Context is undefined");
    8790        return Context::rootContext_s;
    8891    }
     
    97100        return this->objectLists_[classID];
    98101    }
     102
     103    void Context::destroyObjectList(const Identifier* identifier)
     104    {
     105        ObjectListBase* objectList = this->getObjectList(identifier);
     106        delete objectList;
     107        this->objectLists_[identifier->getClassID()] = NULL;
     108    }
    99109}
Note: See TracChangeset for help on using the changeset viewer.