Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

proper disposal of HID queues and interfaces?



Hey all! Just wondering if there is anything redundant about the way I
dispose of HID queues and interfaces. Here's what I'm doing:

// The queue is running (it has been started), and the
// interface is closed at this point

// Elsewhere in the program, I have the following set of declarations:
// IOHIDDeviceInterface **interface;
// IOHIDQueueInterface **queue;
// CFRunLoopSourceRef runLoopSource;

(*interface)->open(interface, 0);
(*queue)->stop(queue);
CFRunLoopRemoveSource(myRunLoop,
                      runLoopSource,
                      kCFRunLoopDefaultMode);
(*queue)->dispose(queue);
(*interface)->close(interface);
(*interface)->Release(interface);

So am I doing any redundant calls?
Could I instead just call the interface's Release method, or would
that lead to memory leaks / other problems?

Thanks,

Andrew
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/usb/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.