|
|
|
|
|
by kazinator
887 days ago
|
|
The object is not exactly removed from the container. It is removed from existence. The object in that situation resides in the container physically. It is constructed there and destroyed. It does not exist outside of the container afterwards, or at any other time. This is a low-level memory management strategy being conflated with object-orientation, that is alien to higher level languages. |
|
Yet I think an high level language could have the same value/reference distinction. Or you could do it with linear types.