diff options
| author | gingerBill <bill@gingerbill.org> | 2018-07-08 11:03:56 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2018-07-08 11:03:56 +0100 |
| commit | 0e91298fd1d16de9bc0c11b9ccf0dcd7e43603a2 (patch) | |
| tree | 453c6f5960ee3eb2dc52a01524f0de8251b0acee /examples | |
| parent | e515220694c79f44f0ee2783287667dc4ab5e5fe (diff) | |
Rename `free` to `delete` for non pointer types
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/demo/demo.odin | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/demo/demo.odin b/examples/demo/demo.odin index 416950d6c..7106b2438 100644 --- a/examples/demo/demo.odin +++ b/examples/demo/demo.odin @@ -378,6 +378,7 @@ parametric_polymorphism :: proc() { context <- c { old_slots := table.slots; + defer delete(old_slots); cap := max(2*len(table.slots), TABLE_SIZE_MIN); allocate(table, cap); @@ -385,8 +386,6 @@ parametric_polymorphism :: proc() { for s in old_slots do if s.occupied { put(table, s.key, s.value); } - - free(old_slots); } } @@ -515,7 +514,7 @@ threading_example :: proc() { } threads := make([dynamic]^thread.Thread, 0, len(prefix_table)); - defer free(threads); + defer delete(threads); for in prefix_table { if t := thread.create(worker_proc); t != nil { |