+BT_HIDDEN
+void bt_notification_event_destroy(struct bt_notification *notif)
+{
+ struct bt_notification_event *event_notif = (void *) notif;
+
+ BT_LIB_LOGD("Destroying event notification: %!+n", notif);
+
+ if (event_notif->event) {
+ BT_LIB_LOGD("Recycling event: %!+e", event_notif->event);
+ bt_event_recycle(event_notif->event);
+ event_notif->event = NULL;
+ }
+
+ g_free(notif);
+}
+
+BT_HIDDEN
+void bt_notification_event_recycle(struct bt_notification *notif)
+{
+ struct bt_notification_event *event_notif = (void *) notif;
+ struct bt_graph *graph;
+
+ BT_ASSERT(event_notif);
+
+ if (unlikely(!notif->graph)) {
+ bt_notification_event_destroy(notif);
+ return;
+ }
+
+ BT_LIB_LOGD("Recycling event notification: %![notif-]+n, %![event-]+e",
+ notif, event_notif->event);
+ bt_notification_reset(notif);
+ BT_ASSERT(event_notif->event);
+ bt_event_recycle(event_notif->event);
+ event_notif->event = NULL;
+ graph = notif->graph;
+ notif->graph = NULL;
+ bt_object_pool_recycle_object(&graph->event_notif_pool, notif);
+}
+
+static inline
+struct bt_event *borrow_event(struct bt_notification *notification)