Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

NSLocale object memory leak #74

Open
wants to merge 3 commits into from

2 participants

@scott-42

This fixes the memory leak in the XML Parser that is reported by clang.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 16, 2011
  1. @scott-42

    Fixing the memory leak of an NSLocale object that is reported by clang.

    scott-42 authored
    Signed-off-by: Scott Gustafson <scott@garlicsoftware.com>
Commits on Jul 15, 2011
  1. @TonnyXu

    Set to use YAJL

    TonnyXu authored
Commits on Apr 29, 2012
  1. @scott-42
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 2 deletions.
  1. +1 −1  MGTwitterEngineGlobalHeader.h
  2. +3 −1 MGTwitterXMLParser.m
View
2  MGTwitterEngineGlobalHeader.h
@@ -48,7 +48,7 @@
target.
*/
-#define YAJL_AVAILABLE 0
+#define YAJL_AVAILABLE 1
#define TOUCHJSON_AVAILABLE 0
#ifndef __MGTWITTERENGINEID__
View
4 MGTwitterXMLParser.m
@@ -113,7 +113,9 @@ - (void)parser:(NSXMLParser *)theParser didEndElement:(NSString *)elementName
// Change date-string into an NSDate.
// NSLog(@"%@", [currentNode objectForKey:elementName]);
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
- [dateFormatter setLocale:[[NSLocale alloc] initWithLocaleIdentifier:@"en_US"]];
+ NSLocale *loc = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US"];
+ [dateFormatter setLocale:loc];
+ [loc release];
dateFormatter.dateFormat = @"EEE MMM dd HH:mm:ss +0000 yyyy";
NSDate *creationDate = [dateFormatter dateFromString:[currentNode objectForKey:elementName]];
[dateFormatter release];
Something went wrong with that request. Please try again.