Rename free to delete for non pointer types

This commit is contained in:
gingerBill
2018-07-08 11:03:56 +01:00
parent e515220694
commit 0e91298fd1
8 changed files with 130 additions and 102 deletions
+2 -3
View File
@@ -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 {