Re: [ADVANCED-DOTNET] When to use IDispose

2002-07-30 Thread Howard Hoffman
I'd have to agree with Ian, hopefully not belaboring the point. For the n-tier applications I've worked on, be they J2EE or .Net, the pattern of 'get a database connection' / 'start a dbms txn', do work, commit or rollback the txn, return result is incredibly common. I would go as far as to sa

Re: [ADVANCED-DOTNET] When to use IDispose

2002-07-30 Thread Jesse Liberty
age- > From: Moderated discussion of advanced .NET topics. > [mailto:[EMAIL PROTECTED]]On Behalf Of Ian Griffiths > Sent: Tuesday, July 30, 2002 12:21 PM > To: [EMAIL PROTECTED] > Subject: Re: [ADVANCED-DOTNET] When to use IDispose > > > Yes, I basically agree with you. The onl

Re: [ADVANCED-DOTNET] When to use IDispose

2002-07-30 Thread Ian Griffiths
Yes, I basically agree with you. The only thing I would question is your comment from another post: > have a reference to this object that > contains unmanaged resources, and you absolutely > need to know it has been released, the IDispose > pattern is a good way to handle it. My point (and > Ri

Re: [ADVANCED-DOTNET] When to use IDispose

2002-07-30 Thread Jesse Liberty
Great, then we are on the same page, just arguing about emphasis. The problem is, I don't think this idiom and its dangers are well understood, or even well documented. -j --- Jesse Liberty, President Liberty Associates, Inc. .NET Programming and Training http://www.

Re: [ADVANCED-DOTNET] When to use IDispose

2002-07-30 Thread Andrew Bolstridge
> -Original Message- > From: Mcmullan, Andy (Andrew) [mailto:[EMAIL PROTECTED]] > Sent: 29 July 2002 16:20 > To: [EMAIL PROTECTED] > Subject: Re: [ADVANCED-DOTNET] When to use IDispose > > > FWIW My summary of the issue: > [snip] > Presumably if (when?) Chr

Re: [ADVANCED-DOTNET] When to use IDispose

2002-07-30 Thread Jesse Liberty
There seems to be confusion about the difference between dispose and finalize. Here is what the sdk doc says about finalize: "...the .NET Framework provides the Object.Finalize Method, which allows an object to clean up its unmanaged resources properly when the garbage collector reclaims the memor

Re: [ADVANCED-DOTNET] When to use IDispose

2002-07-30 Thread Ian Griffiths
From: "Jesse Liberty" <[EMAIL PROTECTED]> > > (a) the ability of the GC to do the job is greatly underestimated and I can think of two common scenarios where the GC is provably not up to the job: (1) Database connections, (2) GDI+ resources. I have worked on a web project which at one stage had

Re: [ADVANCED-DOTNET] When to use IDispose

2002-07-30 Thread Mickey Williams
Ahem. IDisposable. I'm afraid I don't really understand the point you're trying to make. It's only intended to be used when you have strong ownership of an instance, and can't be reliably used elsewhere without some sort of explicit management layer. All it does is formalize the Dispose patter

Re: [ADVANCED-DOTNET] When to use IDispose

2002-07-30 Thread Marco Dorantes Martinez
: Jesse Liberty [mailto:[EMAIL PROTECTED]] Sent: Mon 7/29/2002 8:08 AM To: [EMAIL PROTECTED] Cc: Subject: [ADVANCED-DOTNET] When to use IDispose I'd like to open a discussion of when to use IDispose (a quick search of the archives shows that this has not been disc

[ADVANCED-DOTNET] Moderation (was: RE: [ADVANCED-DOTNET] When to use IDispose)

2002-07-29 Thread Richard Blewett
ed, it may be that they just haven't been approved. Regards Richard Blewett DevelopMentor -Original Message- From: Moderated discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED]]On Behalf Of Pradeep Tapadiya Sent: 29 July 2002 18:52 To: [EMAIL PROTECTED] Subject: Re: [ADVANC

Re: [ADVANCED-DOTNET] When to use IDispose

2002-07-29 Thread Nick Wienholt
esee large-scale problems caused by Dispose. Nick Wienholt Sydney Deep .NET User Group www.sdnug.org - Original Message - From: "Jesse Liberty" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, July 29, 2002 11:08 PM Subject: [ADVANCED-DOTNET] When to use

Re: [ADVANCED-DOTNET] When to use IDispose

2002-07-29 Thread Pradeep Tapadiya
ECTED]> Sent: Monday, July 29, 2002 6:08 AM Subject: [ADVANCED-DOTNET] When to use IDispose > I'd like to open a discussion of when to use IDispose (a quick search of the > archives shows that this has not been discussed recently). > > It is my theory that this idiom will be vastly

Re: [ADVANCED-DOTNET] When to use IDispose

2002-07-29 Thread Mcmullan, Andy (Andrew)
: [EMAIL PROTECTED] Subject: [ADVANCED-DOTNET] When to use IDispose I'd like to open a discussion of when to use IDispose (a quick search of the archives shows that this has not been discussed recently). You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced D

[ADVANCED-DOTNET] When to use IDispose

2002-07-29 Thread Jesse Liberty
I'd like to open a discussion of when to use IDispose (a quick search of the archives shows that this has not been discussed recently). It is my theory that this idiom will be vastly overused. I'll start by quoting Richter: "In general, I strongly discourage the use of calling a Dispose or Close