On Thu, 2 Dec 2004, Xu Levis-Q16136 wrote: > Got it! Thanks~ > Another problem: Do i need free all of the urbs which i have built before in > my diconnect function? Now i just free one urb in my func. > For example: > > struct urb *myurb; > my_prob() > {... > for(i=0; i<5; i++) > { > myurb = usb_alloc_urb(0); > FILL_BULK_UBR(myurb,..............); > usb_submit_urb(myurb); > }... > } > > my_disconnect(myurb) > {... > usb_unlink_urb(myusb); > usb_free_urb(myurb);... > } > > Thanks again! > Levis
Yes, of course you have to free all your URBs. Unless you _like_ memory leaks... Alan Stern ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel