pjfanning commented on code in PR #3030:
URL: https://github.com/apache/pekko/pull/3030#discussion_r3550872822
##########
stream/src/main/scala/org/apache/pekko/stream/impl/fusing/GraphInterpreter.scala:
##########
@@ -342,10 +342,13 @@ import pekko.stream.stage._
var i = 0
while (i < logics.length) {
val logic = logics(i)
- if (!isStageCompleted(logic) && !isStageFinalized(logic)) {
+ if ((logic ne null) && !isStageCompleted(logic) &&
!isStageFinalized(logic)) {
markStageFinalized(logic)
finalizeStage(logic)
}
+ // Release reference to the stage logic so it can be garbage collected
+ // even if the GraphInterpreter is still alive due to other references
+ logics(i) = null
Review Comment:
@He-Pin ping - for me, I'd like to see a response on this before approving
this PR
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]