5 ms·
> and their use is optional It is not, if you have objects with dynamic lifetimes, and allocating them for the whole duration of the program is not an option.
by kaba0 3y ago
> and their use is optional
It is not, if you have objects with dynamic lifetimes, and allocating them for the whole duration of the program is not an option.
Sure, their use can be much less than a managed language that can only do automatic memory management, but RC is objectively a worse from most perspective than tracing GC, except for the fact that they don’t need runtime support, and a slightly lower memory overhead.
- arandomusername 3y ago*shared* objects with dynamic lifetimes. With properly architected code, the times you need to use rc are extremely small.
- pkolaczk 3y ago> and a slightly lower memory overhead 3x to 100x is not „slightly” in my dictionary.