 Many languages offer language constructs to avoid having to call the dispose method explicitly in common situations.The dispose pattern is primarily used in languages whose runtime environment have automatic garbage collection (see motivation below), and thus may be styled as "manual" resource management in languages with "automatic" memory management.Wrapping resources in objects is the object-oriented form of encapsulation, and underlies the dispose pattern.