3 ms·
You need to be careful when allocation multiple resources in a constructor. If the second initialization operation fails, the deconstructor/finalizer/disposer/w
by snprbob86 18y ago
You need to be careful when allocation multiple resources in a constructor. If the second initialization operation fails, the deconstructor/finalizer/disposer/whatever is not called. This means that the first object will never be cleaned up.
In general, it is wise to allocate only one unmanaged (non-garbage collected) resource per constructor.