summaryrefslogtreecommitdiff
path: root/gr-digital/python/digital/qa_pfb_clock_sync.py
diff options
context:
space:
mode:
authorSylvain Munaut <tnt@246tNt.com>2016-01-27 11:24:19 +0100
committerJohnathan Corgan <johnathan@corganlabs.com>2016-01-27 13:09:34 -0800
commit11973c64437683cc99c48eae9eb4db8234f1ac42 (patch)
tree54059f5e91babef20f114ed81629c82a0d4a0244 /gr-digital/python/digital/qa_pfb_clock_sync.py
parent6e482c5bb6bf49f000f6b8d35a1ca84127e38c46 (diff)
gnuradio-runtime: Fix sptr magic when exception thrown in hier2 constructor
Fixes #528 Previously, if an exception is thrown in constructor of a hier_block2 subclass, then : - The hier_block2 base destructor _will_ be called - The actual object is destroyed - But the initial sptr would be left in the static map and point to an invalid object - Whatever connection() were made might have an invalid sptr ref as well So to fix this: - In the hier_block2 destructor, we explicitely disconnect() everything - In the base hier_block2 destructor, we call a new 'cancel sptr' method that will check if this object is still in the static map or not - If it's not: Then this is a legit call to the destructor by shared_ptr and everything is fine - If it's: Then there was an isue and the object is already being destroyed and we need to make sure shared_ptr doesn't try to do it again. We do this using a special 'disarmable' custom deleter. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Diffstat (limited to 'gr-digital/python/digital/qa_pfb_clock_sync.py')
0 files changed, 0 insertions, 0 deletions