You make a very compelling point.
On Jul 15, 2011, at 4:36 PM, Scott Ribe wrote:
> On Jul 15, 2011, at 1:38 PM, Kevin Muldoon wrote:
>
>> However, there must be a better way than giving up control of releasing my
>> objects to NSAutoreleasePool.
>
> How is this giving up control? There's alwa
On Jul 15, 2011, at 1:38 PM, Kevin Muldoon wrote:
> However, there must be a better way than giving up control of releasing my
> objects to NSAutoreleasePool.
How is this giving up control? There's always an NSAutoreleasePool provided by
the run loop which cleans up between handling events; all
On Jul 15, 2011, at 3:38 PM, Kevin Muldoon wrote:
> Hey guys,
>
> I know of at least one way to fix this memory leak but I'm hoping to find a
> few more ways.
>
> I'm chewing through a text file of 205,960 lines in a C while loop. All is
> good until MyObject returns a value. Of course the ret
On Jul 15, 2011, at 12:38 PM, Kevin Muldoon wrote:
> while (fgets(buffer, sizeof(buffer), filePointer) != NULL) {
>
> NSString *line = [[NSString alloc]
> initWithString:[NSString stringWithFormat:@"%s", buffer]];
You could use -[NSString initWithUTF8String:] instead. Addi
Hey guys,
I know of at least one way to fix this memory leak but I'm hoping to
find a few more ways.
I'm chewing through a text file of 205,960 lines in a C while loop.
All is good until MyObject returns a value. Of course the return value
set to autorelease (Well, I suppose it would auto