Function Macro

GObjectclear_weak_pointer

since: 2.56

Declaration [src]

#define g_clear_weak_pointer (
  weak_pointer_location
)

Description [src]

Clears a weak reference to a GObject.

weak_pointer_location must not be NULL.

If the weak reference is NULL then this function does nothing. Otherwise, the weak reference to the object is removed for that location and the pointer is set to NULL.

A macro is also included that allows this function to be used without pointer casts. The function itself is static inline, so its address may vary between compilation units.

Available since: 2.56

This function is not directly available to language bindings.

Parameters

weak_pointer_location

Type: -

The memory address of a pointer.