Re: Updates on Eu 4.2.0
- Posted by petelomax Feb 03, 2022
- 1647 views
acEduardo said...
Since Euphoria operates with value semantics, RAII would be perfect for eliminating the garbage collector.
No, Euphoria operates with copy-on-write semantics. Euphoria is reference counted, with objects being freed when their reference count drops to zero, so there is no garbage collector, and hence no move-semantics.
Further, you cannot have objects on the stack. You can have a reference to an object (or an integer) on the stack, but it makes no sense whatsoever to create or permit a reference to such a transient memory area.