3 ms·
You can use automatic memory management and not worry about it. Or you can use D's prototype ownership/borrowing system. Or you can encapsulate them in somethin
by WalterBright 4y ago
You can use automatic memory management and not worry about it. Or you can use D's prototype ownership/borrowing system. Or you can encapsulate them in something that manages the memory. Or you can do ownership/borrowing by convention (it's not hard to do).
- saagarjha 4y agoAutomatic memory management makes copies?
- WalterBright 4y agoNo. Another word for automatic memory management is garbage collection.
- saagarjha 4y agoI guess I should rephrase. Let's say I have a string, which owns its buffer. What happens in D if I take a substring of it? Does a copy of that section occur to form a new string?