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:13:00 UTC
[tomcat] branch 9.0.x 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 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new a81c8b8 Remove finalize call that can't do anything.
a81c8b8 is described below
commit a81c8b8df4b83677551be890184671f94ccf37f7
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