xuzhenbao commented on issue #515: URL: https://github.com/apache/celix/issues/515#issuecomment-1501894521
> What I remember from the experimental event admin impl is that we struggled with when a Event object could be destroyed and who should destroy it. How about define a event object like : ~~~ C typedef struct celix_event_private { const char *topic; celix_properties_t *properties; struct celix_ref ref; }celix_event_private_t; typedef struct celix_event { /** * @brief event private data */ celix_event_private_t privateData; celix_status_t (*getTopic)(celix_event_t *event, const char **topic); celix_status_t (*matches)( celix_event_t *event); celix_status_t (*getProperty)(event_pt *event, char *propertyKey, celix_properties_entry_t **propertyEntry); ... }celix_event_t; /** *@brief Create event */ celix_event_t *celix_event_create(const char *topic, celix_properties_t* eventProperties); /** *@brief Retains(increases the ref count) the event */ void celix_event_retain(celix_event_t *event); /** *@brief Release(decreases the ref count) the event */ void celix_event_release(celix_event_t *event); ~~~ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@celix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org