[foreign] RFR 8209497: Polish Resource API
John Rose
john.r.rose at oracle.com
Thu Aug 16 00:54:43 UTC 2018
On Aug 15, 2018, at 3:18 AM, Maurizio Cimadamore <maurizio.cimadamore at oracle.com> wrote:
>
> And then, the following Java code:
>
> Foo foo = () -> {};
>
> The above 'foo' is, at least in my opinion, just a plain Java object. In a way, I have not even used the Panama API, at least not directly.
Hmm…. What would happen if Callback gets a default method which reports Scope::HEAP as a constant scope? Then all lambdas spun by Java will have the correct classification as resources: Nothing to free that isn’t covered by the GC. Binder created Callbacks would get both the resource and an override to the default scope reporter.
More information about the panama-dev
mailing list