• Add a Comment
  • Edit
  • More Actions v
  • Quarantine this Entry

Comments (4)

1 localhost commented Permalink

Is this not what the finally clause is for?

2 localhost commented Permalink

Yes, you're right. Bobby Woolf writes about it here.The statement about "along all possible program paths" is correct; just forgot to mention the finally path.Thanks polozoff!-- Bill

3 localhost commented Permalink

Exception Handling and Resource Cleanup 101

4 localhost commented Permalink

As far as the "Exception Handling and Resource Cleanup 101", you are right; however, in examining large code bases, it's amazing how many times these simple rules are forgotten.This is one reason why CodeReview is such a valuable tool. It traces through your entire code base and finds the spots where your junior developers (or your sleepy senior developers) have forgotten to clean up their resources.Have you tried it? It's fun to run against an existing code base that you've been working with for a while; you'll be surpised how many "rookie mistakes" linger in a large code base.If you don't have RAD (which includes CodeReview) and want to try it, you can download it here.

Add a Comment Add a Comment