ptupitsyn commented on code in PR #11508:
URL: https://github.com/apache/ignite/pull/11508#discussion_r1753443423


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/platform/memory/PlatformMemoryPool.java:
##########
@@ -50,7 +50,8 @@ public class PlatformMemoryPool {
     public PlatformMemoryPool() {
         poolPtr = allocatePool();
 
-        GridCleaner.create(this, new CleanerRunnable(poolPtr));
+        Cleaner cleaner = Cleaner.create();
+        cleaner.register(this, new CleanerRunnable(poolPtr));

Review Comment:
   `Cleaner` 
[docs](https://docs.oracle.com/javase/9/docs/api/java/lang/ref/Cleaner.html) 
suggest a shared static cleaner approach:
   
   ```
          // A cleaner, preferably one shared within a library
           private static final Cleaner cleaner = <cleaner>;
   ```



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to