Found and fixed a memory leak in the rope strings

Also fixed a bit manipulation error in the GC.
This commit is contained in:
2026-05-10 15:39:04 +10:00
parent 3b813da1cf
commit 83fb5222a2
9 changed files with 124 additions and 6 deletions
+1 -1
View File
@@ -88,7 +88,7 @@ TOY_API void Toy_collectBucketGarbage(Toy_Bucket** bucketHandle) {
gc = false;
break;
}
ptr += (*((int*)(ptr)) ^ 1) + 4; //XOR to remove the 'free' flag from the size
ptr += ((*((int*)ptr) | 1) ^ 1) + 4; //OR + XOR to remove the 'free' flag from the size
}
//free this link, if its been entirely released