USB_ReferenceDeregister (SWI&55386) — Deregisters a reference to an object.
R0 | Pointer to the structure at which a reference should be deregistered. |
R2 | Object type Table A.8, “Object reference types” |
R3 | Reserved. Must be set to zero. |
R4 | Reserved. Must be set to zero. |
The reference to the object structure is deregistered automatically in every case.
If your no longer wants to use an object to which the application is holding a reference this reference must be deregistered. Normally this is done automatically by using the according functions (eg. USB_EndpointDeregister). But think about the situation that your application has only got a reference to an object by using USB_FindObject (SWI&55387) to enumerate its child's or something like that. In this case USB_FindObject has generated a reference which is protecting the object by deleting which must deregistered if the object is not longer used by the application. If your application was the last one holding a reference to that object it will be removed physically from memory.