Visual C

Implementing IDisposable implies that the instances of this class will use unmanaged resources An unmanaged resource private IntPtr ptr Variable to track call to Dispose method private bool disposed Call the overloaded Dispose method with true as argument, indicating that Dispose is called by the user of the object Dispose true so that it does not call Dispose again protected virtual void Dispose bool called_by_user if the user of the object called the Dispose method Clean managed as well as...

After this lesson you will be able to

Describe the managed execution process Describe how the .NET Framework performs automatic memory management Estimated lesson time 25 minutes Defining the Managed Execution Process Managed execution is the process in which the runtime loads, executes, and provides automatic memory management. Managed execution also performs other useful services, such as performing JIT compilations, ensuring type safety, enforcing security, and handling exceptions. The managed execution process involves managed...

Using the llasmexe Tool

When you compile managed code, the compiler converts the source code to MSIL code. MSIL is a CPU-independent language and its code can be converted to native code. You can use the llasm tool, llasm.exe, to generate a portable executable file from the MSIL code. You can then run the resulting executable file to determine the performance of your application. This enables you to generate the MSIL code and the metadata without emitting MSIL in the portable executable file format. In addition,...