←back to thread

Web Translator API

(developer.mozilla.org)
97 points kozika | 2 comments | | HN request time: 0.401s | source
1. seabass ◴[] No.44379452[source]
With js being a garbage collected language, what is the benefit of the destroy method here and why is it necessary?
replies(1): >>44379744 #
2. charcircuit ◴[] No.44379744[source]
The is no guarantee when it will be garbage collected. For large local models that use a lot of resources they should be unloaded as soon as possible to allow other programs on the computer to use the resources.