3 ms·
In Java, all pointers are GC pointers. But in D, not very many are. For example, objects on the stack aren't GC pointers.
by WalterBright 6y ago
In Java, all pointers are GC pointers. But in D, not very many are. For example, objects on the stack aren't GC pointers.
- moonchild 6y agoObjects on the stack aren't pointers at all...
- WalterBright 6y agoIf you have a struct on the stack, and call member functions, you've got pointers. For an array on the stack, taking a slice of it or looping through it with pointers, you've got pointers. For a variable on the stack, passing it by ref to another function, there are pointers.