Changeset 10624 for code/trunk/src/libraries/core/object/Context.cc
- Timestamp:
- Oct 4, 2015, 9:12:21 PM (10 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
-
code/trunk/src/libraries/core/object/Context.cc
r9667 r10624 76 76 /*static*/ void Context::setRootContext(Context* context) 77 77 { 78 if (Context::rootContext_s)79 delete Context::rootContext_s;80 78 Context::rootContext_s = context; 79 } 80 81 /*static*/ void Context::destroyRootContext() 82 { 83 delete Context::rootContext_s; 84 Context::rootContext_s = NULL; 81 85 } 82 86 83 87 /*static*/ Context* Context::getRootContext() 84 88 { 85 if (!Context::rootContext_s) 86 Context::rootContext_s = new Context(NULL); 89 OrxVerify(Context::rootContext_s != NULL, "Root Context is undefined"); 87 90 return Context::rootContext_s; 88 91 } … … 97 100 return this->objectLists_[classID]; 98 101 } 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 } 99 109 }
Note: See TracChangeset
for help on using the changeset viewer.