See CDynamicObjectArray::get_element(int32_t), there's a call to SG_REF there.