You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2021/08/21 21:12:23 UTC
[tomcat] branch main updated: Remove finalize call that can't do
anything.
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push:
new f24f275 Remove finalize call that can't do anything.
f24f275 is described below
commit f24f27531560a53e363486f998da200557ef7864
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Sat Aug 21 22:12:17 2021 +0100
Remove finalize call that can't do anything.
If Channel is not eligible for GC then it will retain a reference to
RpcChannel so finalize() will never be called.
If Channel is eligible for GC then it will be GC'd along with RpcChannel
and there will be no need to finalize to remove the reference from
Channel to RpcChannel.
---
java/org/apache/catalina/tribes/group/RpcChannel.java | 6 ------
1 file changed, 6 deletions(-)
diff --git a/java/org/apache/catalina/tribes/group/RpcChannel.java b/java/org/apache/catalina/tribes/group/RpcChannel.java
index ab2d45e..81ce511 100644
--- a/java/org/apache/catalina/tribes/group/RpcChannel.java
+++ b/java/org/apache/catalina/tribes/group/RpcChannel.java
@@ -189,12 +189,6 @@ public class RpcChannel implements ChannelListener {
}
@Override
- protected void finalize() throws Throwable {
- breakdown();
- super.finalize();
- }
-
- @Override
public boolean accept(Serializable msg, Member sender) {
if ( msg instanceof RpcMessage ) {
RpcMessage rmsg = (RpcMessage)msg;
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org