[Insight-developers] Tracking Down excessive SmartPointer access

Bradley Lowekamp blowekamp at mail.nih.gov
Wed Nov 27 07:54:39 EST 2013


Hans,

It looks like you are making progress in tracking down excessive concurrent smart pointer usage:

http://review.source.kitware.com/#/c/13642/

What are you using to track this down?

I am reminded of what I did to help track down the ProcessObject::GetOutput over usage. I creating an atomic monotonic counter to detect the number of times called, if that exceeded a threshold, it throw an exception. This allowed all the ITK test to be run, and those which had excessive usage failed.

The Object::Register method could be over ridden in the ImageBase class. For the atomic monotonic counter I just used a separate itk::Object, and the pointer reference countering system... So ImageBase::Register would need to call m_objectCounter->Register... interestingly.

Brad



More information about the Insight-developers mailing list