How to check validity of a C pointer in C#?

132 Views Asked by At

An unmanaged pointer is passed to a method of a class in C#. Before manipulating, I need to make sure that the pointer is allocated with the claimed size and is still valid (not freed yet). How is it possible?

0

There are 0 best solutions below