Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Every .NET Compact Framework application runs inside in a runtime construct called an application ___domain, which is similar to an operating system process. The .NET Compact Framework ensures that all managed resources used by a running application are freed or returned to the host operating system when the application ends.
Application domains offer many of the advantages of processes, such as fault isolation, improved robustness, and security, without requiring support from the underlying host operating system. An application ___domain host starts an instance of the common language runtime and is itself native operating system code. The common language runtime can be statically or dynamically linked to the application ___domain host.
The .NET Compact Framework does not place restrictions on the behavior of the application ___domain host. The application ___domain host can be a simple extension to an existing interactive shell that is used to start and stop programs. On dynamic application systems like Windows, the application ___domain host can be an extension to the application loader so that .NET Compact Framework applications can be started and stopped using the same mechanism as a native application.
Multiple Application Domains
The .NET Compact Framework supports multiple application domains. You can specify an assembly in the constructor of a class. Then you can use CreateDomain method to start a new application ___domain. The new application ___domain loads its own copies of the common language runtime DLLs, data structures, and memory pools. Multiple application domains can exist in one operating system process.
![]() |
---|
The .NET Compact Framework does not support loading assemblies into a ___domain neutral code area for use by multiple application domains. |
The .NET Compact Framework determines when garbage collection should be run. Garbage collection can occur in a single application ___domain or in all application domains. This prevents one application ___domain from using too much memory at the expense of others.