FairyGUI.RichTextField.CleanupObjects C# (CSharp) Method

CleanupObjects() private method

private CleanupObjects ( ) : void
return void
        internal void CleanupObjects()
        {
            List<HtmlElement> elements = textField.htmlElements;
            int count = elements.Count;
            for (int i = 0; i < count; i++)
            {
                HtmlElement element = elements[i];
                if (element.htmlObject != null)
                {
                    if (UpdateContext.working)
                    {
                        //Update里不允许增删对象。放到延迟队列里
                        if (_toCollect == null)
                            _toCollect = new List<IHtmlObject>();
                        _toCollect.Add(element.htmlObject);
                    }
                    else
                    {
                        element.htmlObject.Remove();
                        htmlPageContext.FreeObject(element.htmlObject);
                    }
                }
            }
        }