Re: Using Interface to dispose and null and object



Daniel Jeffrey <daniel_c_jeffrey@xxxxxxxxxxx> wrote:
yes correct
after I make the calls to dispose the CurrentModule and set to null the
ProductsModule is still not null and I can browse its properties etc.

What other code would you like?

A short but complete program showing the problem would be ideal.

See http://www.pobox.com/~skeet/csharp/complete.html for details of
what I mean by that.

--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk
.



Relevant Pages

  • Re: Using Interface to dispose and null and object
    ... after I make the calls to dispose the CurrentModule and set to null the ProductsModule is still not null and I can browse its properties etc. ... I have a class which I have used a interface to define. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Using Interface to dispose and null and object
    ... As you will see when you click the buttons on the form, it should clear the previous reference from CurrentModule and create the new one. ... ProductsModule is still not null and I can browse its properties etc. ... Jon Skeet - ... World class .NET training in the UK: http://iterativetraining.co.uk ...
    (microsoft.public.dotnet.languages.csharp)
  • Using Interface to dispose and null and object
    ... public interface IDataModule: IDisposable ... CurrentModule = ProductsModule; ... CurrentModule = StatusModule; ...
    (microsoft.public.dotnet.languages.csharp)