discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Destructor of block never called


From: Sylvain Munaut
Subject: Re: [Discuss-gnuradio] Destructor of block never called
Date: Tue, 13 Oct 2015 17:15:23 +0200

Hi,


> Actually, I don't mean the red cross in GRC. My application is run in QT GUI
> mode.
>  So, is the cross on the top of my window a stop button?

Yes, it should stop the flow graph cleanly.

However since everything uses smart pointers, it won't "delete" the
object at that point and I'm not really sure that the C++ runtime
strictly guarantees that all destructors will be called if the object
were not deleted. (Since at the process end all the resources would be
freed anyway). And GR can't really call delete itself because when
using Qt a bunch of object lifetime has been delegated to the Qt
runtime.

All in all I would _not_ rely on your destructor being called for
anything important.

stop() will be called for sure though because that part is entirely
under our control.


Another issue you might be encountering is just plain crashes ... Some
time ago I had some crash in GR that went unnoticed just because they
would only happen at flowgraph end time ... you can see that in a
debugger if you get a SIGSEGV or such.


Cheers,

   Sylvain



reply via email to

[Prev in Thread] Current Thread [Next in Thread]