-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Closed
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: bugA general bugA general bug
Milestone
Description
At line 127 of spring-core/src/main/java/org/springframework/core/codec/StringDecoder.java at the main branch, you have
.doOnTerminate(chunks::releaseAndClear)
But chunks won't be released and cleared upon cancellation according to javadoc of reactor-core's reactor.core.publisher.Flux.doOnTerminate():
Add behavior (side-effect) triggered when the Flux terminates, either by completing successfully or failing with an error.
I suggest that you fix this potential memory leak by replacing doOnTerminate() by doFinally() because doFinally() Add behavior (side-effect) triggered after the Flux terminates for any reason, including cancellation.
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: bugA general bugA general bug