Function Macro

GObjectclear_weak_pointer

Declaration

#define g_clear_weak_pointer (
  weak_pointer_location
)

Description

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.