Memory allocation: Difference between revisions

Content added Content deleted
Line 366: Line 366:
<lang objeck>
<lang objeck>
foo := Object->New(); // allocates an object on the heap
foo := Object->New(); // allocates an object on the heap
foo_array := Int->New[size]; // allocates an integer array from the heap
foo_array := Int->New[size]; // allocates an integer array on the heap
x := 0; // allocates an integer on the runtime stack
x := 0; // allocates an integer on the stack
</lang>
</lang>