Hacker News new | ask | show | jobs
by alphaglosined 1455 days ago
But only for structs.

We really need to get actual reference counting into the language to cover classes properly as well.

It has been on my todo list to write a DIP for this for a while now. ~rikki.

1 comments

Class instances can go on the stack too using `scope`:

  scope obj = new Object;
  ...
  // destroyed at end of scope