Differences From Artifact [1c8a76eb56]:
- File
src/OFDataArray.m
— part of check-in
[f7576a66ce]
at
2012-06-06 13:47:52
on branch trunk
— Slightly change the memory management API.
Also fix a bug where OFBigDataArray would waste memory. (user: js, size: 12290) [annotate] [blame] [check-ins using] [more...]
To Artifact [a3be020022]:
- File src/OFDataArray.m — part of check-in [0d4059306a] at 2012-06-07 12:03:10 on branch trunk — Rework OFStream API. (user: js, size: 12284) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
107 108 109 110 111 112 113 | @try { char *buffer = [self allocMemoryWithSize: of_pagesize]; while (![file isAtEndOfStream]) { size_t length; | | | | 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | @try { char *buffer = [self allocMemoryWithSize: of_pagesize]; while (![file isAtEndOfStream]) { size_t length; length = [file readIntoBuffer: buffer length: of_pagesize]; [self addItemsFromCArray: buffer count: length]; } [self freeMemory: buffer]; } @finally { [file release]; |
︙ | ︙ | |||
433 434 435 436 437 438 439 | - (void)writeToFile: (OFString*)path { OFFile *file = [[OFFile alloc] initWithPath: path mode: @"wb"]; @try { | < | > | 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 | - (void)writeToFile: (OFString*)path { OFFile *file = [[OFFile alloc] initWithPath: path mode: @"wb"]; @try { [file writeBuffer: data length: count * itemSize]; } @finally { [file release]; } } - (OFXMLElement*)XMLElementBySerializing { |
︙ | ︙ |