kriszyp/dbind — pull request #6 by asudoh (2013-03-25 14:49:13+00:00)
Title: Support for cleaning up binding.

Some bindable objects may have shorter lifecycle than others. Implemented the following external/APIs to make sure bindable object that has finished its lifecycle no longer affects other bindable objects:

* `remove()` - Marks this object as it finished its lifecycle, and cleans up the binding to the source object as well as its child bindable objects.
* `reset()` - An internal method, typically called from `to()`, that cleans up the (earlier) binding to the source object, as well as the child objects' (earlier) binding to the children of source object (if they were bound by the same `to()` call).
* `own(handle, handle, ...)` - An internal method to let `remove()` method call the cleanup method of the given handles.
* `resettable(handle, handle, ...)` - An internal method to let `reset()` method call the cleanup method of the given handles.