Analyzing Code with Infer#

Play Analyzing Code with Infer#

The Discussion

  • User profile image
    That "resource leak" example is NOT a resource leak. Yes, you should have disposed of the stream object, but as written, after the method is finished the GC is free to collect and finalize that object at any point. In a GC language a resource leak only occurs when a reference to an object is held (possibly indirectly) longer than intended, such as with a static reference.

Add Your 2 Cents