Martin Stjernholm, Roxen IS @ Pike  developers forum wrote:
>In very trivial cases the compiler can determine that the object
>doesn't get refs from elsewhere, e.g:

>  void foo() {
>    Foo x = Foo();
>    bar (y);

>However, if you do just

>  void foo() {
>    Foo x = Foo();
>    bar (x);

>then the compiler can no longer know if x has grown more references
>during the bar or beep calls. For that to work, the compiler would

I see.  You're right, of course.
In that case I'd indeed vote for some kind of micro-gc at the end
of every scope which tries to gc all (and just) the locally declared variables
which are leaving scope.  It would make the invocations of the destructors
more predictabe and timely, and might help in rapid allocation/release cycles
to keep memory usage within bounds.
-- 
Sincerely,
           Stephen R. van den Berg.

"Even if man could understand women, he still wouldn't believe it."
              • ... Martin Stjernholm, Roxen IS @ Pike developers forum
          • M... Henrik Grubbstr�m (Lysator) @ Pike (-) developers forum
            • ... Martin Stjernholm, Roxen IS @ Pike developers forum
              • ... Martin Stjernholm, Roxen IS @ Pike developers forum
              • ... Martin Stjernholm, Roxen IS @ Pike developers forum
              • ... Martin Bähr
              • ... Marcus Agehall (Roxen IS) @ Pike (-) developers forum
              • ... Martin Stjernholm, Roxen IS @ Pike developers forum
          • R... Stephen R. van den Berg
            • ... Martin Stjernholm, Roxen IS @ Pike developers forum
              • ... Stephen R. van den Berg
              • ... Martin Stjernholm, Roxen IS @ Pike developers forum
              • ... Martin Stjernholm, Roxen IS @ Pike developers forum
  • Re: Multi-cpu desi... Martin Stjernholm, Roxen IS @ Pike developers forum

Reply via email to