Closed giann closed 9 months ago
I'm totally out of the loop on buzz right now; but being able to handle Out Of Memory is invaluable.
I don't know. In a garbage collected language what could you do to recover memory? Isn't it pretty much game over when you're out of memory?
In a garbage collected language what could you do to recover memory?
Isn't it pretty much game over when you're out of memory?
If you fail to do either of the above (or don't want to), then throw an error.
Throwing the error will unwind the stack to the next try
/catch
and probably free up some references to some objects that can now be freed.
Now in a CLI tool there there might not be a try
/catch
other than simply printing the error and exiting.
But in e.g.
We could get rid of 70% of error handling code in buzz if we just
@panic
whenOutOfMemory
. I see no value in handling those.