On Thu, 27 Jun 2024 12:54:55 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:

> > …I believe I was referring to the use of C++'s std::unique_ptr, which has 
> > the functionality for cleanup that we need.
> 
> Yes, `std::unique_ptr` could be useful for handling automatic deallocation of 
> objects created with the `new` operator.
> 
> ~~It won't help with releasing references to Java objects though.~~

Since `std::unique_ptr` accepts a custom deleter, it may be used for deleting 
any object.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/19867#issuecomment-2194662542

Reply via email to