withUnsafeReadableBytesWithStorageManagement(_:)

    Yields a buffer pointer containing this ByteBuffer‘s readable bytes. You may hold a pointer to those bytes even after the closure returned iff you model the lifetime of those bytes correctly using the Unmanaged instance. If you don’t require the pointer after the closure returns, use withUnsafeReadableBytes.

    ByteBuffer-core.swift:763
    func withUnsafeReadableBytesWithStorageManagement<T>(_ body: (UnsafeRawBufferPointer, Unmanaged<AnyObject>) throws -> T) rethrows -> T

    Parameters

    body

    The closure that will accept the yielded bytes and the storageManagement.

    Returns

    The value returned by body.

    If you escape the pointer from the closure, you must call storageManagement.retain() to get ownership to the bytes and you also must call storageManagement.release() if you no longer require those bytes. Calls to retain and release must be balanced.

    Other members in extension

    Types

    Typealiases

    Show implementation details (2)

    Hide implementation details

    Type members

    Instance members

    Show obsolete interfaces (3)

    Hide obsolete interfaces