HOT_FUNC ArrayIter::~ArrayIter() { if (hasArrayData()) { const ArrayData* ad = getArrayData(); if (ad) decRefArr(const_cast<ArrayData*>(ad)); return; } ObjectData* obj = getRawObject(); ASSERT(obj); if (obj->decRefCount() == 0) { const_cast<ObjectData*>(obj)->release(); } }
ObjectData *eval_create_object_only_hook(CStrRef s, ObjectData *root) { if (hhvm) { assert_not_implemented(root == NULL); const StringData* className = StringData::GetStaticString(s.get()); return g_vmContext->createObjectOnly((StringData*)className); } else { Eval::ClassEvalState *ce = Eval::RequestEvalState::findClassState(s, true); if (ce) { Object tmp = ce->getClass()->create(*ce, root); ObjectData* ret = tmp.detach(); ret->decRefCount(); return ret; } return 0; } }