Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 11-09-2009, 07:32 AM   #5 (permalink)
krish
krishnan
 
krish's Avatar
 
Join Date: Sep 2009
Location: Chennai
Posts: 38
Send a message via Yahoo to krish
Default

[quote=Iphoneer;140330]
Quote:
Originally Posted by krille View Post

Your dealloc method should include a call to super dealloc. Leaving that off, and it's pretty easy to do, can cause an object to stick around though the retain count for the object is actually zero.


Example dealloc

Code:
    -(void)dealloc {  
      [mobil release];  
      self.mobil = nil;    
      [super dealloc];
  }
Hi Friend, I am using a custom XML parser. But even after releasing it it leaks. Please help me. I have provided the code below:



+(id) requestServiceWithInMemoryContext: (NSManagedObjectContext *)managedObjContext NSString *)methodName : (NSDictionary *)params : (RequestTypes)requestType
{
NSURL *url=[self getURL: methodName : params];
HWXMLParser *xmlParser = [[HWXMLParser alloc] initWithContext:managedObjContext RequestType:requestType];
NSXMLParser *parser = [[NSXMLParser alloc] initWithContentsOfURL:url];
[parser setDelegate:xmlParser];
[parser setShouldProcessNamespaces:NO];
[parser setShouldReportNamespacePrefixes:NO];
[parser setShouldResolveExternalEntities:NO];
[parser parse];
if ( [parser parserError] ) {
NSLog(@"Parse error %@", [parser parserError]);
if(![HWUtility isNetWorkAvailable])
{
[xmlParser release];
[parser release];
return nil;
}
}
[parser release];
[xmlParser saveManagedObjectContext];
returnValue= [xmlParser getParsedResults];
xmlParser=nil;
[xmlParser release];
return returnValue;
}


The returnValue is

id returnValue;


Thank you..
Krishnan.
krish is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,732
Threads: 89,189
Posts: 380,526
Top Poster: BrianSlick (7,128)
Welcome to our newest member, sandihf
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:13 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.