4 ms·
You can’t do exactly this if you’re not in control of all code. With this, if a third-party library interns a string whose content is “Foo” they get a Handle.
by Someone 2y ago
You can’t do exactly this if you’re not in control of all code.
With this, if a third-party library interns a string whose content is “Foo” they get a Handle. If you also intern a string whose content is “Foo”, you get the same Handle back.
Having this in the standard product likely will make all code doing what you propose migrate to use unique.
Also, the implementation likely (I haven’t checked this implementation) will move any interned objects out of the memory range(s) inspected when doing garbage collection. That makes garbage collection do a bit less work.