URBs are managed by the USB core. Drivers can use the API to obtain and release a URB.
A URB is allocated by calling usb_buffer_malloc(USBLib_AllocURB (SWI &5636D)) with a pipe reference and the required data size. The returned URB may only be used for one outstanding transaction at a time.
The driver is responsible for freeing any allocated URBs once finished with. Any URBs which are not freed will not be released and the memory they occupy will be lost until the USB system is completely restarted. Freeing URBs is accomplished by calling usb_buffer_free(USBLib_FreeURB (SWI &5636E)).