This is truly one of the beauties of garbage collection. Chris Sells http://www.sellsbrothers.com
> -----Original Message----- > From: Moderated discussion of advanced .NET topics. [mailto:ADVANCED- > [EMAIL PROTECTED]] On Behalf Of Mike Woodring (DevelopMentor) > Sent: Monday, January 20, 2003 8:06 PM > To: [EMAIL PROTECTED] > Subject: Re: [ADVANCED-DOTNET] Bad mojo to not call Delegate.EndInvoke() ? > > Calling EndInvoke is option, just as paying attention to the return > value of a method is optional. If the function you call returns > something (or a reference to something), you're free to ignore it (and > let the garbage collector do it's thing later if the method is returning > a reference to an object). Same holds true for delegates. You only > need to call EndInvoke if you're interested in harvesting the outcome of > the method that was called (i.e., it's return value, any out/ref args, > or any exception that might be thrown). If you don't care about the > outcome, don't call EndInvoke. > > This is true whether or not the method you're calling has a > void/non-void return value. > > -Mike > http://staff.develop.com/woodring > http://www.develop.com/devresources You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.
