I'm working in WPF and c# and am adding an event handler to an object like
this:
this.tgt.SizeCh anged += new SizeChangedEven tHandler(OnTarg etSizeChanged);
Later I kill the instance of tgt like this:
tgt = null;; //which I'm not sure this is the most correct way of getting
rid of it.
However, I find that the event 'OnTargetSizeCh anged' is still fireing.
Evedently the event handler is still alive and wired. Before I kill the
object 'tgt', should I be removing any attached event handlers? If so, how?
Thanks.
moondaddy@noema il.noemail
this:
this.tgt.SizeCh anged += new SizeChangedEven tHandler(OnTarg etSizeChanged);
Later I kill the instance of tgt like this:
tgt = null;; //which I'm not sure this is the most correct way of getting
rid of it.
However, I find that the event 'OnTargetSizeCh anged' is still fireing.
Evedently the event handler is still alive and wired. Before I kill the
object 'tgt', should I be removing any attached event handlers? If so, how?
Thanks.
moondaddy@noema il.noemail
Comment