nullptr indicates that an object handle, interior pointer, or native pointer type does not point to an object. nullptr is only valid when compiling with /clr (Common Language Runtime Compila……
[/Quote]
nullptr indicates that an object handle, interior pointer, or native pointer type does not point to an object. nullptr is only valid when compiling with /clr (Common Language Runtime Compilation).
You cannot initialize handles to zero; only nullptr can be used. Assignment of constant 0 to an object handle will produce a boxed Int32 and a cast to Object^.
nullptr can be used in the initialization of the following pointer types:
Native pointer:
Managed handle:
Managed interior pointer:
nullptr can be used for reference checking before using a pointer.
nullptr can be used anywhere a handle or a native pointer can be used. nullptr can also be used as an argument for functions.