dev_Dispose()
Dispose of a device and free all allocated memory used by it.
#include "device.h" LResult dev_Dispose ( LDevice device );
device | device to dispose of |
dev_Dispose() disposes of a device created by calling dev_New(). If the device is not closed, dev_Dispose() will call dev_Close() before disposing of the device.
If successful, dev_Dispose() returns a non-negative value. Otherwise, it returns a negative value indicating the reason it failed. Possible unsuccessful return values are:
if ((result = dev_New(deviceName, &device)) < 0) { LOG("New failure", dev_ErrorMessage(result)); } else { if ((result = dev_Open(device)) < 0) { LOG("Open failure", dev_ErrorMessage(result)); dev_Dispose(device); } }