Defined in File comp_node.h
private mgb::comp_node_detail::DepedentObjList (Class DepedentObjList)
public mgb::cg::ComputingGraph (Class ComputingGraph)
base class for objects that depend on CompNode
There is a CompNode::finalize() method that destorys all global comp nodes. Therefore objects that depend on CompNode should all be marked as invalid at that time.
CompNode::finalize() is called in atexit() because some external libraries that CompNode depends on seems to be registering exit handlers. It is also impractical to require a correct destruction order because, for example, in python atexit() handlers are invoked before global python objects get reclaimed.
As a result we give up enforcing a correct destruction order, but rather require all CompNode-dependent objects to derive from this class so they can get notified possibly do most of the cleanup when CompNode is finalized.
Subclassed by mgb::cg::ComputingGraph
overwritten by subclasses to perform clean up jobs
Note: in case the object has nested objects which hold a reference to the object itself, a reference to this object must be kept so it would not be released during the call of on_comp_node_finalize().
exception would thrown if on_comp_node_finalize() has been called (do not raise if invoked from on_comp_node_finalize())
whether on_comp_node_finalize() has been called (true when invoked from on_comp_node_finalize())