Advertise Books Events Forum News Social Networking Support Us

sdkIQ for iPhone
($4.99)

Shape Up
($0.99)

Your First iPhone App
($1.99)

iVidCam Free
(free)

Kid Art
($0.99)

iPUBQUIZ
(£1.19)

ArtStudio
($3.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 11-09-2009, 06:32 AM   #5 (permalink)
krish
Registered Member
 
Join Date: Sep 2009
Posts: 9
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
 
Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Stats
Members: 24,314
Threads: 39,112
Posts: 171,494
Top Poster: smasher (2,576)
Welcome to our newest member, biggybillly
Powered by vBadvanced CMPS v3.1.0

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