Click here to Skip to main content
15,911,890 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionMail forwarding on MS Exchange 2007 Pin
deepak__sharma18-Mar-09 20:11
deepak__sharma18-Mar-09 20:11 
AnswerRe: Mail forwarding on MS Exchange 2007 Pin
Abhijit Jana22-Mar-09 0:45
professionalAbhijit Jana22-Mar-09 0:45 
GeneralRe: Mail forwarding on MS Exchange 2007 Pin
deepak__sharma23-Mar-09 18:02
deepak__sharma23-Mar-09 18:02 
QuestionDo I need to release .NET 3.5 SP1 to all users? Pin
PSU Steve18-Mar-09 4:36
professionalPSU Steve18-Mar-09 4:36 
AnswerRe: Do I need to release .NET 3.5 SP1 to all users? Pin
led mike18-Mar-09 5:35
led mike18-Mar-09 5:35 
GeneralRe: Do I need to release .NET 3.5 SP1 to all users? Pin
PSU Steve18-Mar-09 5:54
professionalPSU Steve18-Mar-09 5:54 
GeneralRe: Do I need to release .NET 3.5 SP1 to all users? Pin
Ravadre18-Mar-09 6:05
Ravadre18-Mar-09 6:05 
GeneralRe: Do I need to release .NET 3.5 SP1 to all users? Pin
supercat920-Mar-09 11:54
supercat920-Mar-09 11:54 
GeneralRe: Do I need to release .NET 3.5 SP1 to all users? Pin
Ravadre20-Mar-09 11:56
Ravadre20-Mar-09 11:56 
GeneralRe: Do I need to release .NET 3.5 SP1 to all users? [modified] Pin
led mike18-Mar-09 7:35
led mike18-Mar-09 7:35 
GeneralRe: Do I need to release .NET 3.5 SP1 to all users? Pin
Dave Kreskowiak18-Mar-09 10:45
mveDave Kreskowiak18-Mar-09 10:45 
GeneralRe: Do I need to release .NET 3.5 SP1 to all users? Pin
led mike19-Mar-09 4:33
led mike19-Mar-09 4:33 
GeneralRe: Do I need to release .NET 3.5 SP1 to all users? Pin
Pete O'Hanlon19-Mar-09 12:57
mvePete O'Hanlon19-Mar-09 12:57 
GeneralRe: Do I need to release .NET 3.5 SP1 to all users? Pin
led mike20-Mar-09 4:37
led mike20-Mar-09 4:37 
GeneralRe: Do I need to release .NET 3.5 SP1 to all users? Pin
Dave Kreskowiak19-Mar-09 14:04
mveDave Kreskowiak19-Mar-09 14:04 
AnswerRe: Do I need to release .NET 3.5 SP1 to all users? Pin
Simon P Stevens18-Mar-09 6:51
Simon P Stevens18-Mar-09 6:51 
QuestionSiteLock template on C# Pin
budarin17-Mar-09 11:57
budarin17-Mar-09 11:57 
QuestionIDisposable, Inheritance and Event Handlers Pin
Alex Feature17-Mar-09 9:36
Alex Feature17-Mar-09 9:36 
Hey Dudes (Dudets),

I read this awesome article IDisposable: What Your Mother Never Told You About Resource Deallocation[^] and a bunch of other not so awesome ones.

However, I failed to find an answer to this question:

1. I got a base class - ObjectA that inherits from a UserControl.

2. ObjectA is then inherited from by ObjectB and tailored to particular uses elsewhere in the code. (ObjectB is not inherited from)

3. There are many different ObjectB implementations (ObjectB1....10) all of which add EventHandlers for ObjectA events and declare their own distinct events that are handled by other objects.

4. Now all ObjectBx objects are stored in a collection and then disposed off like so:

For Each oA as ObjectA in CollectionOfObjectBx
    oA.Dispose
Next


5. Each ObjectBx overloads Dispose method and uses it to Remove EventHandlers.

However, these Dispose overloads never get called because instances of the ObjectBx are disposed via the base class that is not aware of anything going on inside inherited objects.

But does it matter? Want GC eventually kill off all handlers since the objects themselves are dead?


I would greatly appreciate if anyone could shed some light on this.


Regards
Alex

"All your base are belong to us..."

- Mr. Cats (2110 A.D.)

AnswerRe: IDisposable, Inheritance and Event Handlers Pin
Natza Mitzi17-Mar-09 10:02
Natza Mitzi17-Mar-09 10:02 
GeneralRe: IDisposable, Inheritance and Event Handlers Pin
Alex Feature17-Mar-09 21:07
Alex Feature17-Mar-09 21:07 
GeneralRe: IDisposable, Inheritance and Event Handlers Pin
Alex Feature18-Mar-09 2:07
Alex Feature18-Mar-09 2:07 
GeneralRe: IDisposable, Inheritance and Event Handlers Pin
Natza Mitzi18-Mar-09 3:30
Natza Mitzi18-Mar-09 3:30 
AnswerRe: IDisposable, Inheritance and Event Handlers Pin
S. Senthil Kumar19-Mar-09 3:53
S. Senthil Kumar19-Mar-09 3:53 
QuestionProblem in creating website with CMS Pin
itsravie17-Mar-09 5:37
itsravie17-Mar-09 5:37 
AnswerPick a forum and stick with it. Pin
Pete O'Hanlon17-Mar-09 6:07
mvePete O'Hanlon17-Mar-09 6:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.