Don’t wait fo rresource leaks to manifest—detect them automatically and early.
It’s always a good idea to do everything you can to detect problems early rather than wait until they surface in production. But this is particularly true for some classes of problem, foremost among which are resource leaks and exception-handling bugs.
These problems tend to be related (resource leaks often arise from incorrect exception handling) and tend to be systemic. If you make a mistake in one place, you’re very likely to make the same mistake elsewhere. Wait until the symptoms come to light, and you’re going to find yourself faced with a massive task—by that time, the code will be riddled with problems.