[PR #1329] [MERGED] Drop finalize() #1920

Open
opened 2026-01-29 20:56:28 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/google/brotli/pull/1329
Author: @copybara-service[bot]
Created: 9/15/2025
Status: Merged
Merged: 9/16/2025
Merged by: @copybara-service[bot]

Base: masterHead: test_807135470


📝 Commits (1)

📊 Changes

5 files changed (+18 additions, -44 deletions)

View changed files

📝 java/org/brotli/wrapper/dec/Decoder.java (+5 -4)
📝 java/org/brotli/wrapper/dec/DecoderJNI.java (+0 -9)
📝 java/org/brotli/wrapper/enc/BrotliOutputStream.java (+1 -1)
📝 java/org/brotli/wrapper/enc/Encoder.java (+5 -10)
📝 java/org/brotli/wrapper/enc/EncoderJNI.java (+7 -20)

📄 Description

Drop finalize()

Now it is solely embedders responisbility to close things that hold native resources. No more "safety net".

Consider "try-with-resources". For longer lasting items (e.g. native PreparedDictionary) use Cleaner as a last resort.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/google/brotli/pull/1329 **Author:** [@copybara-service[bot]](https://github.com/apps/copybara-service) **Created:** 9/15/2025 **Status:** ✅ Merged **Merged:** 9/16/2025 **Merged by:** [@copybara-service[bot]](https://github.com/apps/copybara-service) **Base:** `master` ← **Head:** `test_807135470` --- ### 📝 Commits (1) - [`85d46ce`](https://github.com/google/brotli/commit/85d46ce6b5d295ac00f72375788eaeb518913e21) Drop finalize() ### 📊 Changes **5 files changed** (+18 additions, -44 deletions) <details> <summary>View changed files</summary> 📝 `java/org/brotli/wrapper/dec/Decoder.java` (+5 -4) 📝 `java/org/brotli/wrapper/dec/DecoderJNI.java` (+0 -9) 📝 `java/org/brotli/wrapper/enc/BrotliOutputStream.java` (+1 -1) 📝 `java/org/brotli/wrapper/enc/Encoder.java` (+5 -10) 📝 `java/org/brotli/wrapper/enc/EncoderJNI.java` (+7 -20) </details> ### 📄 Description Drop finalize() Now it is solely embedders responisbility to close things that hold native resources. No more "safety net". Consider "try-with-resources". For longer lasting items (e.g. native PreparedDictionary) use Cleaner as a last resort. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 20:56:28 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/brotli#1920