8000 Make the life-cycle management of byte_buffer()'s result (a Java DirectByteBuffer instance) safe and transparent. · Issue #126 · jpy-consortium/jpy · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Make the life-cycle management of byte_buffer()'s result (a Java DirectByteBuffer instance) safe and transparent. #126
Open
@jmao-denver

Description

@jmao-denver

A follow-up of #111

{"byte_buffer", JPy_byte_buffer, METH_VARARGS,
            "byte_buffer(obj) - Return a new Java direct ByteBuffer sharing the same underlying, contiguous buffer of obj via its implemented Buffer Protocol. The resulting PYObject must live "
            "longer than the Java object to ensure the underlying data remains valid. In most cases, this means that java functions called in this manner must not keep any references"
            " to the ByteBuffer"},

Right now the onus is on the user to heed and respect the warning. There might be a chance in the future to remove that if Java opens the DirectByteBuffer API up some more.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0