Azure Storage Client (v2.0) - Disposing resources... RRS feed

  • Question

  • What are the suggest best practices around disposing resources when working with Blob storage particularly with Managed client APIs ver 2.0 ?

    None of the following components implement IDispoable (or a Close() method).

    1. CloudStorageAccount
    2. CloudBlobClient
    3. CloudBlobContainer
    4. CloudBlockBlob

    Short of reviewing the source, where can I learn more about best practices around releasing resources?

    Thx in adv



    Wednesday, October 31, 2012 9:47 PM


  • Hi,

    those resources are released automatically by the storage client library, because they're created by the library. For example, using Reflector to review the code, you may notice:
    When designing your own class library, it is also a good idea to dispose the resources you created (but not resources created by the caller).

    Best Regards

    • Marked as answer by Johnson - MSFT Tuesday, November 6, 2012 10:24 AM
    Monday, November 5, 2012 9:39 AM

All replies