Skip to content

Commit

Permalink
fix: removes memory leak (ref 'this') from HollowConsumerBuilder (#653)
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardoramirez authored Dec 16, 2023
1 parent e7ce7db commit 54a4d31
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1365,7 +1365,8 @@ protected void checkArguments() {
}

if (refreshExecutor == null) {
refreshExecutor = newSingleThreadExecutor(r -> daemonThread(r, getClass(), "refresh"));
final Class<?> clazz = getClass(); // to avoid capturing 'this' in lambda
refreshExecutor = newSingleThreadExecutor(r -> daemonThread(r, clazz, "refresh"));
}

if (!memoryMode.consumerSupported()) {
Expand Down

0 comments on commit 54a4d31

Please sign in to comment.