Skip to content

Commit

Permalink
Add autoreleasepool
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabian Zwick committed Oct 9, 2024
1 parent 013bfc5 commit 9639e17
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Source/ID3TagEditor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@ public class ID3TagEditor {
readHandle.seek(toFileOffset: tagSizeWithHeader)
}

while true {
let chunk = readHandle.readData(ofLength: 65536) // 64 KB
guard !chunk.isEmpty else {
break
var isFinished = false
while !isFinished {
autoreleasepool {
let chunk = readHandle.readData(ofLength: 65536) // 64 KB
writeHandle.write(chunk)
isFinished = chunk.isEmpty
}

writeHandle.write(chunk)
}
}

Expand Down

0 comments on commit 9639e17

Please sign in to comment.