Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Retain counting, memory crasher.

  • Loading branch information...
commit 104adea7deebb8f17d632a6ef874a708739c8ee5 1 parent dff8c19
Danny Greg authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 NTSDateOnly.m
View
4 NTSDateOnly.m
@@ -18,7 +18,7 @@ @implementation NTSDateOnly
+ (NSCalendar *)currentCalendar {
static NSCalendar *currentCalendar = nil;
if (currentCalendar == nil) {
- currentCalendar = [NSCalendar currentCalendar];
+ currentCalendar = [[NSCalendar currentCalendar] retain];
//[currentCalendar setTimeZone:[NSTimeZone timeZoneForSecondsFromGMT:0]];
}
return currentCalendar;
@@ -27,7 +27,7 @@ + (NSCalendar *)currentCalendar {
+ (NSCalendar *)standardizedCalendar {
static NSCalendar *standardizedCalendar = nil;
if (standardizedCalendar == nil) {
- standardizedCalendar = [NSCalendar currentCalendar];
+ standardizedCalendar = [[NSCalendar currentCalendar] retain];
[standardizedCalendar setTimeZone:[NSTimeZone timeZoneForSecondsFromGMT:0]];
}
return standardizedCalendar;
Please sign in to comment.
Something went wrong with that request. Please try again.