thanks very much.
On Fri, Oct 30, 2009 at 3:39 PM, Kai BrĂ¼ning wrote:
>
> On 30.10.2009, at 08:36, Roland King wrote:
>
> Autoreleased objects are only autoreleased when the pool is drained. It is
>> more than likely that the XMLDocument initWithContentsOfURL makes a lot of
>> temporary objects
On 30.10.2009, at 08:36, Roland King wrote:
Autoreleased objects are only autoreleased when the pool is drained.
It is more than likely that the XMLDocument initWithContentsOfURL
makes a lot of temporary objects which end up on the autorelease
pool but they won't actually be released until
Autoreleased objects are only autoreleased when the pool is drained. It
is more than likely that the XMLDocument initWithContentsOfURL makes a
lot of temporary objects which end up on the autorelease pool but they
won't actually be released until the end of your loop.
Put another pool alloc at
The piece of code I want to discuss is followed:
#import
int main (int argc, const char * argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
for(int i=0;i<5000;i++)
{
NSURL *inAbsoluteURL = [[[NSURL alloc] initFileURLWithPath:@"the
path to one xml file"] a