Is an inherited base object called an object's parent?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In the .NET docs about implementing a Dispose() method to avoid costly
finalization, the following confuses me:

<Quote>
Implementing a Dispose Method
A type's Dispose method should release all the resources that it owns. It
should also release all resources owned by its base types by calling its
parent type's Dispose method. The parent type's Dispose method should release
all resources that it owns and in turn call its parent type's Dispose method,
propagating this pattern through the hierarchy of base types. To ensure that
resources are always cleaned up appropriately, a Dispose method should be
callable multiple times without throwing an exception.
</Quote>

How is it possible for an object to release it's own base types by calling
it's parent's Dispose()????

Are they calling the object's base type it's parent?? If so, then I guess I
finally get the meaning.
 
Stick said:
Are they calling the object's base type it's parent?? If so, then I guess I
finally get the meaning.

Parent type = base type, yes. If it was "parent object" it would be
confusing, but it isn't.

-- Barry
 
Back
Top