@@ -132,11 +132,11 @@ size_t j = 0; if (length > UINT32_MAX) @throw [OFOutOfRangeException exception]; - UTF16 = of_alloc(length, sizeof(OFChar16)); + UTF16 = OFAllocMemory(length, sizeof(OFChar16)); @try { DWORD UTF16Len; OFMutableData *rest = nil; size_t i = 0; @@ -251,11 +251,11 @@ } if (rest != nil) [self unreadFromBuffer: rest.items length: rest.count]; } @finally { - free(UTF16); + OFFreeMemory(UTF16); } objc_autoreleasePoolPop(pool); return j; @@ -355,11 +355,11 @@ _incompleteUTF8SurrogateLen = 0; i += toCopy; } - tmp = of_alloc(length * 2, sizeof(OFChar16)); + tmp = OFAllocMemory(length * 2, sizeof(OFChar16)); @try { DWORD bytesWritten; while (i < length) { OFUnichar c; @@ -434,11 +434,11 @@ exceptionWithObject: self requestedLength: j * 2 bytesWritten: bytesWritten * 2 errNo: 0]; } @finally { - free(tmp); + OFFreeMemory(tmp); } /* * We do not count in bytes when writing to the Win32 console. But * since any incomplete write is an exception here anyway, we can just