Open prydt opened 7 years ago
This seems implementation-specific. Not something that might be in the spec, but something that should be looked into in the official CIC.
I think we should take C++'s manual memory management. No reference counting, no garbage collection at all. When you create something, you have to remember to add new
, and when you're done with an object, you have to manually delete
it.
The variables specification already has del
which requires the memory be cleared, so it looks like we already have memory management.
I'm not sure if cic-suggestion
is appropriate; something like del
would be a language feature, and a requirement that the CIC keep track of memory and dispose of it when it becomes inaccessible would be in the specification.
Why not both? Have objects be garbage collected, and but require programmers to use del
after every allocation as well.
How would that work, @iptq?
Will we leave garbage collection up to the programmer, such as in C(++) or should we implement garbage collection under the hood, such as in Python and in PHP?