Re: Using Interface to dispose and null and object
- From: "Daniel Jeffrey" <daniel_c_jeffrey@xxxxxxxxxxx>
- Date: Mon, 10 Dec 2007 09:25:01 +1000
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?
Thanks for your help.
Dan
"Jon Skeet [C# MVP]" <skeet@xxxxxxxxx> wrote in message news:MPG.21c67dae73a475386ce@xxxxxxxxxxxxxxxxxxxxxxx
Daniel Jeffrey <daniel_c_jeffrey@xxxxxxxxxxx> wrote:I may be on the wrong track here but I thought I could do this, but it isn't
working.
I have a class which I have used a interface to define.
This class is then inherited from, and many of them are used (conditionally)
on a form.
In order to simplify my dispose area, I thought I could use the interface to
dispose and null the items, but it doesn't seem to work.
It will work fine, but you haven't posted enough code for us to work
out what the probem is. Are ProductsModule and StatusModule definitely
non-null?
--
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
.
- Follow-Ups:
- Re: Using Interface to dispose and null and object
- From: Jon Skeet [C# MVP]
- Re: Using Interface to dispose and null and object
- References:
- Using Interface to dispose and null and object
- From: Daniel Jeffrey
- Re: Using Interface to dispose and null and object
- From: Jon Skeet [C# MVP]
- Using Interface to dispose and null and object
- Prev by Date: Re: Managed class inherit from unmanaged class
- Next by Date: Re: Using Interface to dispose and null and object
- Previous by thread: Re: Using Interface to dispose and null and object
- Next by thread: Re: Using Interface to dispose and null and object
- Index(es):
Relevant Pages
|