3 ms·
What about objects who are referenced by more than one object, and which are linked to resources? try... finally blocks are just a different way of freeing your
by lelele 15y ago
What about objects who are referenced by more than one object, and which are linked to resources? try... finally blocks are just a different way of freeing your resources at the end of a block, and won't help with objects which outlive the block they are guarding.
Actually, here is your choice: either you'll have to manage every kind of resource except memory (garbage collected languages), or you'll have to manage only memory (C++).