aboutsummaryrefslogtreecommitdiff
path: root/projects/12/Array.jack
diff options
context:
space:
mode:
authorYuchen Pei <me@ypei.me>2018-01-17 16:44:59 +0100
committerYuchen Pei <me@ypei.me>2018-01-17 16:44:59 +0100
commitfd8e3bee660f22032b51bc12452353b141e125be (patch)
treed9f406d85fdac99844770818eeadc8954e387627 /projects/12/Array.jack
parentc3598a26ab4ba0562ede74b37dc2a7aa6907640a (diff)
checkpoint
- finished Array - finished Sys - revised Memory
Diffstat (limited to 'projects/12/Array.jack')
-rw-r--r--projects/12/Array.jack2
1 files changed, 2 insertions, 0 deletions
diff --git a/projects/12/Array.jack b/projects/12/Array.jack
index ee31129..c712b69 100644
--- a/projects/12/Array.jack
+++ b/projects/12/Array.jack
@@ -15,9 +15,11 @@ class Array {
/** Constructs a new Array of the given size. */
function Array new(int size) {
+ return Memory.alloc(size);
}
/** Disposes this array. */
method void dispose() {
+ return Memory.deAlloc(this);
}
}