From bb678ecae3cd1b7f5949da6b6019db18ba809602 Mon Sep 17 00:00:00 2001 From: Victor Milovanov Date: Sat, 20 Feb 2021 19:26:46 -0800 Subject: [PATCH] ensure interned strings can not be referenced after InternString.Shutdown --- src/runtime/intern.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/runtime/intern.cs b/src/runtime/intern.cs index d8bdf863e..ced1e5e92 100644 --- a/src/runtime/intern.cs +++ b/src/runtime/intern.cs @@ -42,9 +42,10 @@ public static void Initialize() public static void Shutdown() { - foreach (var ptr in _intern2strings.Keys) + foreach (var entry in _intern2strings) { - Runtime.XDecref(ptr); + Runtime.XDecref(entry.Key); + typeof(PyIdentifier).GetField(entry.Value).SetValue(null, IntPtr.Zero); } _string2interns = null; _intern2strings = null; pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy