pnoltes commented on code in PR #591:
URL: https://github.com/apache/celix/pull/591#discussion_r1271555710


##########
libs/utils/include/celix_array_list.h:
##########
@@ -148,6 +149,8 @@ celix_array_list_t* celix_arrayList_createWithOptions(const 
celix_array_list_cre
 CELIX_UTILS_EXPORT
 void celix_arrayList_destroy(celix_array_list_t *list);
 
+CELIX_DEFINE_AUTOPTR_CLEANUP_FUNC(celix_array_list_t, celix_arrayList_destroy)

Review Comment:
   Nice and clean single line marco call to add the SBRM for celix array list.
   
   But I do wonder if this needs to be coupled to `celix_arrayList_destroy`.
   
   Maybe in the case for array list, hash maps, etc we should introduce a 
`_retain`  and `_release` function and couple the `celix_autoptr`. In this case 
the get a something akin to shared_ptr. 
   For backwards compatibility the `_destroy` can be kept, but with a assert on 
a use count of 1.



-- 
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

Reply via email to