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

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.
 
B

Barry Kelly

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top