+ return (void *) notification;
+}
+
+BT_HIDDEN
+void bt_notification_event_destroy(struct bt_notification *notif)
+{
+ struct bt_notification_event *event_notif = (void *) notif;
+
+ BT_LOGD("Destroying event notification: addr=%p", notif);
+
+ if (event_notif->event) {
+ BT_LOGD_STR("Recycling event.");
+ bt_event_recycle(event_notif->event);
+ }
+
+ BT_LOGD_STR("Putting clock class priority map.");
+ BT_PUT(event_notif->cc_prio_map);
+ 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 (!notif->graph) {
+ bt_notification_event_destroy(notif);
+ return;
+ }
+
+ BT_LOGD("Recycling event notification: addr=%p", notif);
+ bt_notification_reset(notif);
+
+ if (event_notif->event) {
+ BT_LOGD_STR("Recycling event.");
+ bt_event_recycle(event_notif->event);
+ event_notif->event = NULL;
+ }
+
+ BT_PUT(event_notif->cc_prio_map);
+ graph = notif->graph;
+ notif->graph = NULL;
+ bt_object_pool_recycle_object(&graph->event_notif_pool, notif);