[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [IMP-dev] Common object base



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
--
                      http://salilab.org/~ben/
"It is a capital mistake to theorize before one has data."
	- Sir Arthur Conan Doyle