Few difficult for me questions about Dispose()

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Piotrekk

    Few difficult for me questions about Dispose()

    Hi

    I have few questions which I would like to ask:

    1. When would I place my own code to Form1 : Form method
    2. When would I create Dispose method by implementing IDispose - what
    is the example scenario. If so, why is better than doing something
    different / simpler

    What I am trying to understand is the reason for IDisposable
    interface. Does implementing this interface really introduces
    benefits?
    When I work with the data I never really use Dispose - maybe should I
    in some cases?

    Best Regards
    Piotr Ko³odziej
  • Tom

    #2
    Re: Few difficult for me questions about Dispose()

    I certainly can relate to your questions!!

    I posted recently on similar topic and got some wonderful replies from
    some of the many gurus who frequent here. Their explanations were of
    great help to me. I suggest reading the following thread because I
    can't explain it any better than those who helped me out.

    FileStream.Clos e() & GarbageCollecti on - Memory Leak Question

    The above topic was posted on 2/4/08.

    I hope it helps. :)

    -- Tom

    On Sat, 9 Feb 2008 07:08:09 -0800 (PST), Piotrekk
    <Piotr.Kolodzie j@gmail.comwrot e:
    >Hi
    >
    >I have few questions which I would like to ask:
    >
    >1. When would I place my own code to Form1 : Form method
    >2. When would I create Dispose method by implementing IDispose - what
    >is the example scenario. If so, why is better than doing something
    >different / simpler
    >
    >What I am trying to understand is the reason for IDisposable
    >interface. Does implementing this interface really introduces
    >benefits?
    >When I work with the data I never really use Dispose - maybe should I
    >in some cases?
    >
    >Best Regards
    >Piotr Ko³odziej

    Comment

    Working...