Bytes.this

Creates a glib.Bytes from data.

When the last reference is dropped, free_func will be called with the user_data argument.

data must not be modified after this call is made until free_func has been called to indicate that the bytes is no longer in use.

data may be NULL if size is 0.

  1. this(GBytes* gBytes, bool ownedRef)
  2. this(ubyte[] data)
  3. this(ubyte[] data, GDestroyNotify freeFunc, void* userData)
    class Bytes
    this

Parameters

data ubyte[]

the data to be used for the bytes

freeFunc GDestroyNotify

the function to call to release the data

userData void*

data to pass to free_func

Return Value

Throws

ConstructionException GTK+ fails to create the object.

Meta

Since

2.32