Unsafe code and the use of pointer types

In languages such as C or C++, developers have the features to create pointers or *, which is an object that stores the memory address of another variable. This object allowed very low-level access of the memory to the application. However, due to the possibility of dangling pointers, the performance of the application suffers greatly. A dangling pointer is a potential situation that could exist in C when a pointer object is still pointing to a memory location that is no longer allocated in the application. Please refer to the following diagram:

In the diagram, we have an application running in C or ...

Get Programming in C#: Exam 70-483 (MCSD) Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.