From 9a4cf4b0f8207efd773e28ff1af5c5713b69f68f Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 9 Dec 2014 13:52:45 +1000 Subject: [PATCH] doc: put some extra warning in for libinput_event_destroy() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Unlike all other structs, events aren't refcounted and will get destroyed immediately. Signed-off-by: Peter Hutterer Reviewed-by: Jonas Ã…dahl --- src/libinput.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/libinput.h b/src/libinput.h index 22b0cfe2..d62516d1 100644 --- a/src/libinput.h +++ b/src/libinput.h @@ -335,6 +335,9 @@ struct libinput_seat; * * The base event type. Use libinput_event_get_pointer_event() or similar to * get the actual event type. + * + * @warning Unlike other structs events are considered transient and + * not refcounted. */ struct libinput_event; @@ -382,7 +385,12 @@ struct libinput_event_touch; /** * @ingroup event * - * Destroy the event. + * Destroy the event, freeing all associated resources. Resources obtained + * from this event must be considered invalid after this call. + * + * @warning Unlike other structs events are considered transient and + * not refcounted. Calling libinput_event_destroy() will + * destroy the event. * * @param event An event retrieved by libinput_get_event(). */