Your simplified code would not be thread safe. A thread swap after the
first instruction of
mov (%rdi), %rax
could potentially cause a problem. RAX (A) contains the pointer to the
string descriptor, which includes the pointer to the actual string data and
the reference count.
Should "A"
Hi,
Procedure ManagedMove(const source: T;var dest: T;count: SizeInt);
In principle a good idea. However this is one of those cases where
you'd definitely need to use constref instead of const.
Or var, since the source might be cleared
And perhaps there could be a special attribute