Revert "Try to use a local pool to avoid huge memory consumption"
This reverts commit e57d875e0a
.
pull/12/head
parent
e57d875e0a
commit
4d2c734781
|
@ -904,7 +904,6 @@ static NSCharacterSet *whitespaceCharSet = nil;
|
||||||
; be unfolded
|
; be unfolded
|
||||||
*/
|
*/
|
||||||
NSMutableString *line;
|
NSMutableString *line;
|
||||||
NSAutoreleasePool *pool;
|
|
||||||
unsigned pos, length;
|
unsigned pos, length;
|
||||||
NSRange r;
|
NSRange r;
|
||||||
|
|
||||||
|
@ -915,18 +914,11 @@ static NSCharacterSet *whitespaceCharSet = nil;
|
||||||
length = [_rawString length];
|
length = [_rawString length];
|
||||||
r = NSMakeRange(0, 0);
|
r = NSMakeRange(0, 0);
|
||||||
line = [[NSMutableString alloc] initWithCapacity: 75 + 2];
|
line = [[NSMutableString alloc] initWithCapacity: 75 + 2];
|
||||||
pool = [[NSAutoreleasePool alloc] init];
|
|
||||||
|
|
||||||
for (pos = 0; pos < length; pos++)
|
for (pos = 0; pos < length; pos++)
|
||||||
{
|
{
|
||||||
unichar c;
|
unichar c;
|
||||||
|
|
||||||
if (pos % 10 == 0)
|
|
||||||
{
|
|
||||||
RELEASE(pool);
|
|
||||||
pool = [[NSAutoreleasePool alloc] init];
|
|
||||||
}
|
|
||||||
|
|
||||||
c = [_rawString characterAtIndex: pos];
|
c = [_rawString characterAtIndex: pos];
|
||||||
|
|
||||||
if (c == '\r')
|
if (c == '\r')
|
||||||
|
@ -1019,9 +1011,6 @@ static NSCharacterSet *whitespaceCharSet = nil;
|
||||||
r.length += 1;
|
r.length += 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RELEASE(pool);
|
|
||||||
|
|
||||||
if (r.length > 0)
|
if (r.length > 0)
|
||||||
{
|
{
|
||||||
[self warn: @"Last line of parse string is not properly terminated!"];
|
[self warn: @"Last line of parse string is not properly terminated!"];
|
||||||
|
|
Loading…
Reference in New Issue