Warning
uCalc API Preview Release Notice:The uCalc engine has successfully transitioned to modern cross-platform environments.The next phase envolves some structural changes, performance optimizations, and API refinements.The API is subject to breaking changes prior to the stable release. Please evaluate the preview version thoroughly before production use.
Many functions create a new string object derived from another given object. This option determines the persistence of previously derived objects. The right option depends on what you want to do. If you're looking to conserve memory, then ClearAll may be the option you need. However, with this option, you can no longer refer to previously derived strings, otherwise the behavior will be undefined (such as crashing). You may delay object deletetion be removing only the ones that overlap in location with the newly derived string. The decision to delete may be delayed based on when an object is being written to. ChildStringOptions::ClearOverlapOnWrite, allows you to have multiple overlapping views of the same parent string without any conflict. Only when modifying a derived string are overlapped derived strings removed. Corresponding Detach options are similar, except that instead of actually erasing an overlapping object, it is disassociated from the parent string. It can continue to be used as an independent string without undefined behavior. With this option, the independent strings are erased only when the parent string itself is erased.
This page last modified on: