1.

What is Unmanaged Code in VB.NET ? State the benefits and drawbacks of unmanaged code.

Answer»

Unmanaged code is code that the operating system directly executes. It has always focused on the architecture of the processor and is dependent on the architecture of the computer. On compilation, this code tends to choose a particular architecture and execute on that platform. LOOSELY speaking, if you wish to run similar codes on a different architecture, you must recompile it in accordance with that architecture. The compilation is always done to the native code, which is architecture-specific.

The developer MANAGES to allot space, security, type safety, and other aspects of unmanaged programming. As a result, various memory-related issues arise, such as space overflow, memory leakage, override of pointers, and so on. Unmanaged code executable files are usually binary images, x86 code that is loaded directly into memory. Unmanaged code is used in applications created in VB 6.0, C, C++, and other languages. The following GRAPHIC depicts the running of an unmanaged code:

Some of the benefits of Unmanaged Code are as follows:

  • Unmanaged code gives the programmer low-level access.
  • It can also allow us to access the hardware directly.
  • It enables the user to SKIP certain of the managed code framework's parameters and restrictions.

Some of the drawbacks of Unmanaged Code are as follows:

  • The application is not secure as a result of it.
  • Memory-related difficulties, such as memory space overflow, arise as a result of access to memory allocation.
  • The programmer is also in charge of handling ERRORS and exceptions.
  • It is not concerned with rubbish collection.


Discussion

No Comment Found