3 ms·
Saying "use immutable data structures" here assumes garbage collection though. If you didn't have garbage collection, when would you release the memory for the
by rix0r 10y ago
Saying "use immutable data structures" here assumes garbage collection though.
If you didn't have garbage collection, when would you release the memory for these structures? That would bring you back to refcounting.
- Rexxar 10y agoIs it a problem in practice to use reference counting for an "immutable data structures" ? Obviously it's not 100% immutable as the counters are updated. But if it's done with a thread safe reference counter the data structures is usable like a pure immutable data structure and doesn't need an additional garbage collector.
- deleted 10y ago[deleted]
- david-given 10y agoOh, yeah, I missed that bit of context. Oops. OP's comment makes much more sense now...