The term "unmanaged resource" is confusing. A more useful concept is "cleanup responsibility". If an object holds unmanaged resources, that means three things:
- It manipulates some longer-lived entity outside itself,
- That entity may be in a state requiring cleanup, and
- The object is responsible for providing the required cleanup
Generally, the term "managed resource" is used to refer to objects which hold unmanaged resources, but which will receive notification from the garbage collector (via the Finalize routine) if they are found to be abandoned, and which will use such notification to provide cleanup (in case they got abandoned before their normal cleanup method was invoked). Some people use the term "managed resource" to refer to things that don't require any cleanup, but I don't like such usage, since there isn't any other good term to refer to things that should be cleaned up manually but will use finalization as a fallback in case normal cleanup doesn't happen.
Note that while unmanaged resources are often things like OS handles for files, GDI entities, etc. it's a mistake to think of them in such terms. It's possible to have unmanaged resources which do not access anything outside the .Net framework; event handlers are a common example of that. The critical aspect of unmanaged resources is that they need cleanup, and failure to perform such cleanup will have some undesirable consequence.