Hi,

what is the best way to release an unix device that can't handle
multiple opens?

I've created a video device class in C, where the device gets opened
with an instanciation like:

  Wc::Cam.new '/dev/video0'

In this class i also added a destructor that closes the device. But it
is called to late. From

http://www.rubygarden.org/ruby?ResourceAcquisitionIsInitialization

i've seen, that i cant aspect a direct destruction of the object if it's
not more in use.

Is there a more elegant way to free the resources automatically, as to
create a special free or close method for my object?

Cheers
detlef