BuckeyeSoftware / rex

rex engine and game
MIT License
15 stars 0 forks source link

Small string optimization needs a rewrite #27

Closed graphitemaster closed 4 years ago

graphitemaster commented 4 years ago

We currently hold a pointer to inside ourselves in rx::string which points to either the embedded SSO buffer or a heap allocated buffer for when the string cannot fit in SSO. This is problematic for providing zero-copy bindings to languages like Rust where moves are destructive and the contents are treated as a byte-wise copy. This leads to the situation where an SSO optimized string, when moved, has a pointer to the embedded SSO buffer of the moved-from string.

graphitemaster commented 4 years ago

Not needed now