Greetings,

Is there a smart way to delete a GNU Radio block in C++?
Until now I have been using the shared_ptr().reset() method but it
seems to me that it will only call the destructor if the parent
top_block has not been run.

This gives me problems when I try to delete and recreate a hardware
input block (e.g. gr-audio input) where the new device can be the same
as the old one, in which case it will report "device busy".
The specific code in question is here:
https://github.com/csete/gqrx/blob/afd02e241f0569e485ecbb1c312599ba60c5431c/applications/gqrx/receiver.cpp#L112

It makes no difference if I stop() the top block before attempting the reset().


Perhaps these hardware input blocks are coded incorrectly and should
close the device in their stop() method? Or is there something else we
can do?

Thanks in advance

Alex

_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to