                    NativeMethods.HtmVisitorFree(bridgeHandle);
                    lock ({{ trait_pascal }}Bridge._registryLock)
                    {
                        {{ trait_pascal }}Bridge._bridgeRegistry.Remove(bridge._bridgeId);
                    }
