### Function

# Camel ObjectBag new

#### Declaration [src]

    CamelObjectBag*
    camel_object_bag_new (
      GHashFunc key_hash_func,
      GEqualFunc key_equal_func,
      CamelCopyFunc key_copy_func,
      GFreeFunc key_free_func
    )

#### Description [src]

Returns a new object bag. Object bags are keyed hash tables of objects that can be updated atomically using transaction semantics. Use `camel_object_bag_destroy()` to free the object bag.

This function is not directly available to language bindings.

#### Parameters

`key_hash_func`

  Type: `GHashFunc`

  A hashing function for keys.

`key_equal_func`

  Type: `GEqualFunc`

  A comparison function for keys.

`key_copy_func`

  Type: `CamelCopyFunc`

  A function to copy keys.

`key_free_func`

  Type: `GFreeFunc`

  A function to free keys.

#### Return value

Type: `CamelObjectBag`

A newly-allocated `CamelObjectBag`.

The data is owned by the called function.