jni-bindgen icon indicating copy to clipboard operation
jni-bindgen copied to clipboard

Opposite of Local::leak

Open MarcoPolo opened this issue 5 years ago • 1 comments

It would be nice to be able to create a local from a Ref that was made via a leak so you can use the existing Drop trait to clean it up.

One thing to worry about is we would only want to do this with things that we leaked from a Local. But not things that came from an Argument or Global.

MarcoPolo avatar Jan 14 '20 20:01 MarcoPolo

This would definitely need to be an unsafe API.

MaulingMonkey avatar Jan 14 '20 21:01 MaulingMonkey