MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / rt_custom_object_destroy

Function rt_custom_object_destroy

src/object.c:797–812  ·  view source on GitHub ↗

* This function will destroy a custom object * container. * * @param obj the specified name of object. * * @note this function shall not be invoked in interrupt status. */

Source from the content-addressed store, hash-verified

795 * @note this function shall not be invoked in interrupt status.
796 */
797rt_err_t rt_custom_object_destroy(rt_object_t obj)
798{
799 rt_err_t ret = -1;
800
801 struct rt_custom_object *cobj = (struct rt_custom_object *)obj;
802
803 if (obj && obj->type == RT_Object_Class_Custom)
804 {
805 if (cobj->destroy)
806 {
807 ret = cobj->destroy(cobj->data);
808 }
809 rt_object_delete(obj);
810 }
811 return ret;
812}
813#endif
814
815/** @} group_object_management */

Callers 1

_object_node_deleteFunction · 0.85

Calls 1

rt_object_deleteFunction · 0.85

Tested by

no test coverage detected