You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 16, 2022. It is now read-only.
What steps will reproduce the problem?
I have a method where I fetch GDataFeedBase entries and return these as an
array to another function
NSMutableArray *tempFeedArray = [NSMutableArray array];
NSURL *feedURL = [[NSURL alloc] initWithString:escapedUrlString];
NSData *data = [NSData dataWithContentsOfURL:feedURL];
GDataFeedBase *feedBase = [[GDataFeedBase alloc] initWithData:data];
[tempFeedArray addObjectsFromArray:[feedBase entries]];
[feedURL release];
[feedBase release];
return tempFeedArray;
.....
I have another function where I retrieve required values from tempFeedArray
object that is GDataEntryYouTubeVideo
for(int count = 0; count < loopCount; count ++){
NSMutableDictionary *feedBaseEntryDict = [[NSMutableDictionary alloc] init];
entry = [tempFeedArray objectAtIndex:count];
youTubeUrl = [[entry alternateLink] href];
if ([entry statistics]!= nil) {
noOfVws= [[[entry statistics] viewCount] intValue];
}
duratn = [[[entry mediaGroup] duration] stringValue];
descr = [[[entry mediaGroup] mediaDescription] stringValue];
authorName = [[[entry authors] objectAtIndex:0] name];
publishedDt = [[entry publishedDate] stringValue];
rating = [[[entry rating] average] stringValue];
imageURL = [[[[entry mediaGroup] mediaThumbnails] objectAtIndex:0] URLString];
videoTitle = [[[entry mediaGroup] mediaTitle] stringValue];
.....
}
......
Check this link as well where users have reported of this issue:
http://markmail.org/message/6hfc43gcgl7hezu6#query%3amemory%20leak%20GDataXMLNod
e+page:1+mid:4ozoqkwthvf2mg5o+state%3aresults
What is the expected output? What do you see instead?
On using it for first time, leak doesn't occur. On subsequent calls, it starts
leaking at GDataXMLNode stringFromXMLString
See attached screenshot.
What version of the product are you using? On what operating system?
I am using v1.9.1 gdata
Original issue reported on code.google.com by agr....@gmail.com on 29 Apr 2011 at 5:37
Since the code is "stealing" entries from the feed, leaving them pointing to
their parent feed (rather than copying the entries, which would create
independent versions) there may be an issue with the strings cache. The cache
is stored in the document, which in the initial response is in the feed being
discarded.
Try disabling the cache by commenting out -addStringsCacheToDoc in
GDataXMLNode.m and see if that changes the leaks report.
Original comment by gregrobbins on 29 Apr 2011 at 2:05
Also, try explicitly copying the entries from the feed rather than just
retaining them:
NSArray *entryCopies = [GDataUtilities
arrayWithCopiesOfObjectsInArray:[feedBase entries]];
[tempFeedArray addObjectsFromArray:entryCopies];
Original comment by g...@coldnose.net on 29 Apr 2011 at 4:45
Original issue reported on code.google.com by
agr....@gmail.com
on 29 Apr 2011 at 5:37Attachments:
The text was updated successfully, but these errors were encountered: