I was worried that I was having issues with python prematurely deleting objects so I added a common base class on the heap allocated objects (to replace boost::noncopyable). This class enforces the non- copyability as well as uses a conservative heuristic to keep track of when the object has been deleted but is still in use and to try to throw an exception when such has been detected.
We don't currently have issues with object ownership in IMP, but they are a pain to track down when they occur as python generally just unceremoniously bombs. And it gets rid of the funny IMP/boost files.
A few other bounds checks and null pointer checks have been added also.
There are no API changes associated with this patch.
Daniel Russel wrote: > I was worried that I was having issues with python prematurely deleting > objects so I added a common base class on the heap allocated objects (to > replace boost::noncopyable). This class enforces the non-copyability as > well as uses a conservative heuristic to keep track of when the object > has been deleted but is still in use and to try to throw an exception > when such has been detected. > > We don't currently have issues with object ownership in IMP, but they > are a pain to track down when they occur as python generally just > unceremoniously bombs. And it gets rid of the funny IMP/boost files. > > A few other bounds checks and null pointer checks have been added also.
Sounds reasonable to me; committed as r651. The patch also included a bunch of changes to the graph and bond decorators, which I did not apply, as it was entirely unrelated. You can put that in a separate patch (with a relevant log message) if you like.
Ben
participants (2)
-
Ben Webb
-
Daniel Russel