private T Single(UQuery.SingleQueryMatcher matcher) { matcher.Run(m_Element, m_Matchers); var match = matcher.match as T; // We need to make sure we don't leak a ref to the VisualElement. matcher.match = null; return(match); }
private T Single(UQuery.SingleQueryMatcher matcher) { if (matcher.IsInUse()) //Prevent reentrance issues { matcher = matcher.CreateNew(); } matcher.Run(m_Element, m_Matchers); var match = matcher.match as T; // We need to make sure we don't leak a ref to the VisualElement. matcher.match = null; return(match); }