You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by GitBox <gi...@apache.org> on 2021/06/09 22:00:49 UTC
[GitHub] [datasketches-memory] leerho commented on a change in pull request #130: Cleanup exceptions
leerho commented on a change in pull request #130:
URL: https://github.com/apache/datasketches-memory/pull/130#discussion_r648713847
##########
File path: src/main/java/org/apache/datasketches/memory/internal/AllocateDirect.java
##########
@@ -33,7 +33,7 @@
* @author Lee Rhodes
*/
@SuppressWarnings({"restriction","synthetic-access"})
-final class AllocateDirect implements AutoCloseable {
+final class AllocateDirect {
Review comment:
This was redundant. See [WritableDirectHandleImpl](https://github.com/apache/datasketches-memory/blob/AddExceptions/src/main/java/org/apache/datasketches/memory/internal/WritableDirectHandleImpl.java).
- The AllocateDirect class provides the means to allocate and close off-heap memory.
- The WritableMemory provides the extensive API to access this memory once allocated.
- The WritableDirectHandleImpl inherits AutoCloseable from WritableHandle and joins the AllocateDirect and the WritableMemory (the API) together.
In this way the allocation of a resource, and the control of closing a resource are independent of each other and both are independent of the access API.
Neat, huh :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org