/* This function will detach a static object from object system, and the memory of static object is not freed.  */
void rt_object_detach(rt_object_t object)
/* This function will detach a static object from object system, and the memory of static object is not freed.  */
void rt_object_detach(rt_object_t object)
{
    rt_base_t level;
    struct rt_object_information *information;
    RT_ASSERT(object != RT_NULL);
    RT_OBJECT_HOOK_CALL(rt_object_detach_hook, (object));
    information = rt_object_get_information((enum rt_object_class_type)object->type);
    RT_ASSERT(information != RT_NULL);
    level = rt_spin_lock_irqsave(&(information->spinlock));
    rt_list_remove(&(object->list));
    rt_spin_unlock_irqrestore(&(information->spinlock), level);
    object->type = 0;
}