Contents

append(length:allocator:deallocator:range:flags:)

Adds a memory block to a block buffer using a custom allocator and deallocator.

Declaration

func append(length: Int, allocator: @escaping  CMBlockBuffer.CustomBlockAllocator, deallocator: @escaping  CMBlockBuffer.CustomBlockDeallocator, range: Range<Int>? = nil, flags: CMBlockBuffer.Flags = []) throws

Parameters

  • length:

    The length of the memory block in bytes. Must not be zero. This is the size to allocate when you call the Assureblockmemory() function.

  • allocator:

    An object that allocates a memory block.

  • deallocator:

    An object that deallocates a memory block.

  • range:

    The range within the memory block to which the block buffer should refer to data. If this value is nil, the block buffer uses the whole memory block.

  • flags:

    Feature and control flags.

See Also

Modifying a Block Buffer