No, I didn't.  That would do the trick.  

The code in the 'Go' method of Blinker is...

        public void Go (  )
        {
            _stop = false;
            while ( !_stop )
            {
                SetPinState(on);
                Thread.Sleep ( TimeSpan.FromMilliseconds ( _onIntervalMs
) );
                SetPinState(off);
                Thread.Sleep ( TimeSpan.FromMilliseconds (
_offIntervalMs ) );
            }
        }

        public void Stop ()
        {
            _stop = true;
        }




-----Original Message-----
From: Discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] On Behalf Of Peter Vertes
Sent: Friday, March 28, 2008 11:51 AM
To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM
Subject: Re: [ADVANCED-DOTNET] Thread implementation issue

On Fri, Mar 28, 2008 at 11:44 AM, Ryan Heath <[EMAIL PROTECTED]>
wrote:

>
> Did you implement a Finalize as well, which calls your Dispose method?
>
> Without a Finalize, nobody is going to call your Dispose method for
you.
>

+1 to what Ryan said.  Without a Finalize it would be up to you to call
Blinker.Dispose() after you stop it (if you'd want to dispose of it
after
stopping that is).


-Pete

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to