[patch] Fix for Fir destructor not getting called
Don McCoy
don at codesourcery.com
Sat Jun 7 22:52:09 UTC 2008
This patch fixes a problem in which the Ref_counted_ptr holder's count_
member was being incremented one too many times, resulting in the Fir
destructor not getting called.
The problem occurs because in the dispatch mechanism
(Evaluator::exec()), the Fir_impl backend is created and stored in a
Ref_counted_ptr object, then passed to the Fir class and stored in yet
another Ref_counted_ptr object. This results in a reference count of 2
after creation, inhibiting the destructor from being called when the Fir
object goes out of scope.
While this does in fact fix the problem, I would like to verify that it
is the correct fix in this case. Comments?
Regards,
--
Don McCoy
don (at) CodeSourcery
(888) 776-0262 / (650) 331-3385, x712
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: rc.changes
URL: <http://sourcerytools.com/pipermail/vsipl++/attachments/20080607/622ca9c0/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: rc.diff
URL: <http://sourcerytools.com/pipermail/vsipl++/attachments/20080607/622ca9c0/attachment-0001.ksh>
More information about the vsipl++
mailing list