From bad92b3daa535534dae96ea8c86a972c0a717ebf Mon Sep 17 00:00:00 2001 From: Avraham Date: Wed, 20 Oct 2021 10:57:13 +0300 Subject: [PATCH] Update how-to-marshal-callbacks-and-delegates-by-using-cpp-interop.md typo: underlaying -> underlying --- ...w-to-marshal-callbacks-and-delegates-by-using-cpp-interop.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/dotnet/how-to-marshal-callbacks-and-delegates-by-using-cpp-interop.md b/docs/dotnet/how-to-marshal-callbacks-and-delegates-by-using-cpp-interop.md index e47ccbcacf6..404ebc9ed8c 100644 --- a/docs/dotnet/how-to-marshal-callbacks-and-delegates-by-using-cpp-interop.md +++ b/docs/dotnet/how-to-marshal-callbacks-and-delegates-by-using-cpp-interop.md @@ -18,7 +18,7 @@ The following example demonstrates how to configure an unmanaged API to trigger Notice that is it possible, but not necessary, to pin the delegate using [pin_ptr (C++/CLI)](../extensions/pin-ptr-cpp-cli.md) to prevent it from being re-located or disposed of by the garbage collector. Protection from premature garbage collection is needed, but pinning provides more protection than is necessary, as it prevents collection but also prevents relocation. -If a delegate is re-located by a garbage collection, it will not affect the underlaying managed callback, so is used to add a reference to the delegate, allowing relocation of the delegate, but preventing disposal. Using GCHandle instead of pin_ptr reduces fragmentation potential of the managed heap. +If a delegate is re-located by a garbage collection, it will not affect the underlying managed callback, so is used to add a reference to the delegate, allowing relocation of the delegate, but preventing disposal. Using GCHandle instead of pin_ptr reduces fragmentation potential of the managed heap. ```cpp // MarshalDelegate1.cpp