Jump to content

Memory allocation: Difference between revisions

m
Line 773:
All memory in Oforth is managed by the garbage collector. Objects are all allocated on the heap using new on a class.
 
Stack can't be accessed and objects are never allocated on the stack : the stack holds only references to objects stored into local variables or parameters.
 
The data stack holds only references to objects allocated on the heap.
 
You can allocate a block of memory (on the heap) by creating a MemBuffer object, which is an array of bytes.
1,015

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.