deterministic/non-deterministic destructor
Deterministic destructor can be called by user code. Non-deterministic destructor can't be called by user code and user also doesn't know when it is called. Usually, non-deterministic destructor is invoked by garbage collector. In C++/CLI, destructor of a class is deterministic and finalizer is non-deterministic (~MyClass() and !MyClass()).
So the difference between deterministic and non-deterministic may be whether the time for an object to be destroyed can be determined by user or not.
So the difference between deterministic and non-deterministic may be whether the time for an object to be destroyed can be determined by user or not.
留言
張貼留言