From c9db6641fba59ff58667595e313c5fc7f57fbdf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnther=20Foidl?= Date: Wed, 1 Oct 2025 03:02:27 +0200 Subject: [PATCH] Corrected note in DllImportResolver (#11865) Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Co-authored-by: Aaron Robinson Co-authored-by: Jan Kotas --- xml/System.Runtime.InteropServices/DllImportResolver.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System.Runtime.InteropServices/DllImportResolver.xml b/xml/System.Runtime.InteropServices/DllImportResolver.xml index 9e9d4eba92d..491a11b1dca 100644 --- a/xml/System.Runtime.InteropServices/DllImportResolver.xml +++ b/xml/System.Runtime.InteropServices/DllImportResolver.xml @@ -39,7 +39,7 @@ The runtime does not do any lifetime management around the handle returned by a . It is left to the implementation and consuming code to keep the library loaded for as long as necessary and free it if/when desired. -The resolver delegate is called everytime when a PInvoke call is done. It is fine to cache the handle, as long as the consuming code does not call . +The resolver is typically called once for each PInvoke entry point. To improve performance, the implementation of the resolver can cache the `libraryName` to handle mapping, as long as the library isn't unloaded via . ]]>