ValidateAndReturnError
ValidateAndReturnError
- Subject: ValidateAndReturnError
- From: Ruddy Opimbat <email@hidden>
- Date: Thu, 2 Aug 2007 23:07:29 +0200 (CEST)
Hi! I'm trying to use the ValidateAndReturnError
? method for NSXMLDocument
? in order to validate a simple xml, but this method is giving me some memory leak. Here is my code:
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSXMLDocument *xmlDoc=nil;
NSError *err=nil;
NSURL *furl=[[NSURL alloc]init];
furl = [NSURL fileURLWithPath:@"/Users/mey/Desktop/file.xml"];
xmlDoc = [[NSXMLDocument alloc] initWithContentsOfURL:furl options:(NSXMLNodePreserveWhitespace|NSXMLNodePreserveCDATA) error:&err];
if([xmlDoc
validateAndReturnError:&err]){ // error is here
NSLog(@"Message Valide ");
}else{
NSLog(@"Message invalide");
NSLog(@"Error description: %@",err);
}
[pool release];
return 0;
}
I'm having the following error,
*** malloc: vm_allocate(size=8421376) failed (error code=3) *** malloc[8676]: error: Can't allocate region
I think that the problem is coming from the validateAndReturnError! Can someone tell me what I am doing wrong here? Thanks.
mey!
Ne gardez plus qu'une seule adresse mail !
Copiez vos mails vers Yahoo! Mail
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Accessibility-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden