[ITK Community] [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

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-developers



More information about the Community mailing list