Fix memory leak in SdkSpan#spanEndingThread by gerolf-da · Pull Request #7984 · open-telemetry/opentelemetry-java
SdkSpan never releases the reference to the Thread in spanEndingThread. This means that the thread (and all the objects referenced by it) cannot be garbage collected, if the SdkSpan is held in memory for an extended period of time. Since spanEndingThread is only needed in the ENDING phase, it can be set back to null once the ENDED phase has been reached.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters