Re: xml object memory issue

2009-10-30 Thread XiaoGang Li
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

Re: xml object memory issue

2009-10-30 Thread Kai BrĂ¼ning
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

Re: xml object memory issue

2009-10-30 Thread Roland King
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

xml object memory issue

2009-10-30 Thread XiaoGang Li
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