The release function When the reference count goes to zero... ...the object must be released. You must define a release function: void my_release_func(struct kobject *kobj) { struct my_object *object; object = container_of(kobj, struct my_object, kobj); kfree(object); } Any kobject without a release function is broken No other way to know when it is free