estanglerbm commented on a change in pull request #1034:
URL: https://github.com/apache/royale-asjs/pull/1034#discussion_r740996972
##########
File path: frameworks/projects/MXRoyale/src/main/royale/mx/core/UITextFormat.as
##########
@@ -587,8 +587,8 @@ public class UITextFormat extends TextFormat
//sm.measuringElement.style.display = "none"; // to try to
keep it hidden
measuringElement.style.opacity = 0;
measuringElement.style["pointer-events"] = "none";
- sm.element.appendChild(measuringElement);
- sm.measuringElement = measuringElement;
+ if (sm) sm.element.appendChild(measuringElement);
Review comment:
In this function, "measuringElement" is what is being used, so that's
being created. The code above is just saying that sm.element and
sm.measuringElement won't be updated, because, you know, !sm.
But yes, if !sm, then it is leaking "span" elements. But I don't think !sm
lasts forever (and I probably didn't want to update this.measuringElementRef
because I wanted to allow sm to eventually be set, somehow). I choose
temporary leak over crash. I didn't debug enough to determine why !sm.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]