[sword-svn] r3260 - in trunk/bindings/objc: ObjCSword.xcodeproj src src/services
mdbergmann at crosswire.org
mdbergmann at crosswire.org
Fri Oct 3 01:17:45 MST 2014
Author: mdbergmann
Date: 2014-10-03 01:17:45 -0700 (Fri, 03 Oct 2014)
New Revision: 3260
Modified:
trunk/bindings/objc/ObjCSword.xcodeproj/project.pbxproj
trunk/bindings/objc/src/FilterProviderFactory.mm
trunk/bindings/objc/src/SwordBible.h
trunk/bindings/objc/src/SwordBible.mm
trunk/bindings/objc/src/SwordBibleBook.h
trunk/bindings/objc/src/SwordBibleBook.mm
trunk/bindings/objc/src/SwordBibleChapter.h
trunk/bindings/objc/src/SwordBibleChapter.m
trunk/bindings/objc/src/SwordBibleTextEntry.h
trunk/bindings/objc/src/SwordBibleTextEntry.m
trunk/bindings/objc/src/SwordBook.h
trunk/bindings/objc/src/SwordBook.mm
trunk/bindings/objc/src/SwordCommentary.mm
trunk/bindings/objc/src/SwordDictionary.mm
trunk/bindings/objc/src/SwordFilter.mm
trunk/bindings/objc/src/SwordInstallSource.mm
trunk/bindings/objc/src/SwordInstallSourceManager.h
trunk/bindings/objc/src/SwordInstallSourceManager.mm
trunk/bindings/objc/src/SwordKey.mm
trunk/bindings/objc/src/SwordListKey.mm
trunk/bindings/objc/src/SwordManager.h
trunk/bindings/objc/src/SwordManager.mm
trunk/bindings/objc/src/SwordModule+Index.mm
trunk/bindings/objc/src/SwordModule.h
trunk/bindings/objc/src/SwordModule.mm
trunk/bindings/objc/src/SwordModuleTextEntry.h
trunk/bindings/objc/src/SwordModuleTextEntry.m
trunk/bindings/objc/src/SwordModuleTreeEntry.h
trunk/bindings/objc/src/SwordModuleTreeEntry.m
trunk/bindings/objc/src/SwordVerseKey.mm
trunk/bindings/objc/src/SwordVerseManager.mm
trunk/bindings/objc/src/VerseEnumerator.mm
trunk/bindings/objc/src/services/Configuration.m
Log:
Converted to ARC (Automatic Reference Counting).
Modified: trunk/bindings/objc/ObjCSword.xcodeproj/project.pbxproj
===================================================================
--- trunk/bindings/objc/ObjCSword.xcodeproj/project.pbxproj 2014-09-27 07:36:53 UTC (rev 3259)
+++ trunk/bindings/objc/ObjCSword.xcodeproj/project.pbxproj 2014-10-03 08:17:45 UTC (rev 3260)
@@ -1191,7 +1191,7 @@
A9D4360511C4FE97007AFE83 /* SwordModule+Index.h in Headers */ = {isa = PBXBuildFile; fileRef = A9D4360311C4FE97007AFE83 /* SwordModule+Index.h */; settings = {ATTRIBUTES = (Public, ); }; };
A9D4360611C4FE97007AFE83 /* SwordModule+Index.mm in Sources */ = {isa = PBXBuildFile; fileRef = A9D4360411C4FE97007AFE83 /* SwordModule+Index.mm */; };
A9D4382311C52947007AFE83 /* locales.d in Resources */ = {isa = PBXBuildFile; fileRef = A9D437CE11C52947007AFE83 /* locales.d */; };
- A9D9FA0B13EEE5CF00EA9DEB /* libsword.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = A954ABC313EE9AB00094E3FE /* libsword.dylib */; };
+ A9D9FA0B13EEE5CF00EA9DEB /* libsword.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = A954ABC313EE9AB00094E3FE /* libsword.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
A9EF1416120595650078A27C /* SwordLocaleManager.h in Headers */ = {isa = PBXBuildFile; fileRef = A9EF1414120595650078A27C /* SwordLocaleManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
A9EF1417120595650078A27C /* SwordLocaleManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = A9EF1415120595650078A27C /* SwordLocaleManager.mm */; };
/* End PBXBuildFile section */
@@ -3040,13 +3040,10 @@
A94EABF0117B28920018B06F /* SwordDictionary.mm */,
A94EABE5117B28920018B06F /* SwordBibleBook.h */,
A94EABE6117B28920018B06F /* SwordBibleBook.mm */,
- A94EABE7117B28920018B06F /* SwordBibleChapter.h */,
- A94EABE8117B28920018B06F /* SwordBibleChapter.m */,
A94EABFF117B28920018B06F /* SwordModuleTextEntry.h */,
A94EAC00117B28920018B06F /* SwordModuleTextEntry.m */,
A94EAC01117B28920018B06F /* SwordModuleTreeEntry.h */,
A94EAC02117B28920018B06F /* SwordModuleTreeEntry.m */,
- A94EABE9117B28920018B06F /* SwordBibleTextEntry.h */,
A94EABE7117B28920018B06F /* SwordBibleChapter.h */,
A94EABE8117B28920018B06F /* SwordBibleChapter.m */,
A94EABE9117B28920018B06F /* SwordBibleTextEntry.h */,
@@ -4137,7 +4134,6 @@
A96C2353176AF19C008D714B /* osisenum.cpp */,
A96C2354176AF19C008D714B /* osisglosses.cpp */,
A96C2355176AF19C008D714B /* osisreferencelinks.cpp */,
- A96C2355176AF19C008D714B /* osisreferencelinks.cpp */,
A9E9C5ED16806A2B00ECEB39 /* teixhtml.cpp */,
A954A85513EE98B30094E3FE /* cipherfil.cpp */,
A954A85613EE98B30094E3FE /* gbffootnotes.cpp */,
@@ -5234,7 +5230,7 @@
name = LongRunningTests;
productName = Tests;
productReference = A9BDFA6B1207F9870067ED5B /* Tests.octest */;
- productType = "com.apple.product-type.bundle";
+ productType = "com.apple.product-type.bundle.ocunit-test";
};
A9BFB0A113EDF51000032679 /* Tests */ = {
isa = PBXNativeTarget;
@@ -5253,7 +5249,7 @@
name = Tests;
productName = "Tests-new";
productReference = A9BFB0A213EDF51000032679 /* Tests.octest */;
- productType = "com.apple.product-type.bundle";
+ productType = "com.apple.product-type.bundle.ocunit-test";
};
A9D2714414D717D800DA8926 /* imp2gbs */ = {
isa = PBXNativeTarget;
@@ -5499,7 +5495,7 @@
0867D690FE84028FC02AAC07 /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 0510;
+ LastUpgradeCheck = 0610;
};
buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "ObjCSword" */;
compatibilityVersion = "Xcode 3.2";
@@ -6715,6 +6711,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ENABLE_OBJC_ARC = YES;
CODE_SIGN_IDENTITY = "Developer ID Application: Manfred Bergmann";
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
@@ -6757,6 +6754,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ENABLE_OBJC_ARC = YES;
CODE_SIGN_IDENTITY = "Developer ID Application: Manfred Bergmann";
COMBINE_HIDPI_IMAGES = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
@@ -6797,6 +6795,7 @@
1DEB91B208733DA50010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ CODE_SIGN_IDENTITY = "Developer ID Application: Manfred Bergmann";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_VERSION = "";
@@ -6804,17 +6803,20 @@
GCC_WARN_UNUSED_VARIABLE = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
+ VALID_ARCHS = x86_64;
};
name = Debug;
};
1DEB91B308733DA50010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ CODE_SIGN_IDENTITY = "Developer ID Application: Manfred Bergmann";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_VERSION = "";
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
SDKROOT = macosx;
+ VALID_ARCHS = x86_64;
};
name = Release;
};
@@ -6823,6 +6825,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "compiler-default";
+ CLANG_ENABLE_OBJC_ARC = YES;
CODE_SIGN_IDENTITY = "Developer ID Application: Manfred Bergmann";
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
@@ -6873,6 +6876,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "compiler-default";
+ CLANG_ENABLE_OBJC_ARC = YES;
CODE_SIGN_IDENTITY = "Developer ID Application: Manfred Bergmann";
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = YES;
Modified: trunk/bindings/objc/src/FilterProviderFactory.mm
===================================================================
--- trunk/bindings/objc/src/FilterProviderFactory.mm 2014-09-27 07:36:53 UTC (rev 3259)
+++ trunk/bindings/objc/src/FilterProviderFactory.mm 2014-10-03 08:17:45 UTC (rev 3260)
@@ -9,7 +9,7 @@
@interface FilterProviderFactory ()
- at property(nonatomic, retain) id <FilterProvider> filterProvider;
+ at property(nonatomic, strong) id <FilterProvider> filterProvider;
@end
@@ -33,10 +33,6 @@
return self.filterProvider;
}
-- (void)dealloc {
- self.filterProvider = nil;
- [super dealloc];
-}
@end
\ No newline at end of file
Modified: trunk/bindings/objc/src/SwordBible.h
===================================================================
--- trunk/bindings/objc/src/SwordBible.h 2014-09-27 07:36:53 UTC (rev 3259)
+++ trunk/bindings/objc/src/SwordBible.h 2014-10-03 08:17:45 UTC (rev 3260)
@@ -29,7 +29,7 @@
NSMutableDictionary *books;
}
- at property (retain, readwrite) NSMutableDictionary *books;
+ at property (strong, readwrite) NSMutableDictionary *books;
// ----------- class methods -------------
+ (void)decodeRef:(NSString *)ref intoBook:(NSString **)bookName book:(int *)book chapter:(int *)chapter verse:(int *)verse;
Modified: trunk/bindings/objc/src/SwordBible.mm
===================================================================
--- trunk/bindings/objc/src/SwordBible.mm 2014-09-27 07:36:53 UTC (rev 3259)
+++ trunk/bindings/objc/src/SwordBible.mm 2014-10-03 08:17:45 UTC (rev 3260)
@@ -119,14 +119,7 @@
return self;
}
-- (void)finalize {
- [super finalize];
-}
-- (void)dealloc {
- [books release];
- [super dealloc];
-}
#pragma mark - Bible information
@@ -141,7 +134,7 @@
for(int i = 0;i < bookCount;i++) {
sword::VersificationMgr::Book *book = (sword::VersificationMgr::Book *)system->getBook(i);
- SwordBibleBook *bb = [[[SwordBibleBook alloc] initWithBook:book] autorelease];
+ SwordBibleBook *bb = [[SwordBibleBook alloc] initWithBook:book];
[bb setNumber:i+1];
NSString *bookName = [bb name];
@@ -169,8 +162,6 @@
}
- (void)setBooks:(NSMutableDictionary *)aBooks {
- [aBooks retain];
- [books release];
books = aBooks;
}
@@ -274,7 +265,7 @@
NSString *ret;
// save key
- SwordVerseKey *save = [(SwordVerseKey *)[self getKeyCopy] autorelease];
+ SwordVerseKey *save = (SwordVerseKey *)[self getKeyCopy];
SwordVerseKey *key = [SwordVerseKey verseKeyWithVersification:[self versification]];
[key setHeadings:YES];
@@ -292,7 +283,7 @@
NSString *ret;
// save key
- SwordVerseKey *save = [(SwordVerseKey *)[self getKeyCopy] autorelease];
+ SwordVerseKey *save = (SwordVerseKey *)[self getKeyCopy];
SwordVerseKey *key = [SwordVerseKey verseKeyWithVersification:[self versification]];
[key setHeadings:YES];
@@ -314,7 +305,7 @@
NSString *ret;
// save key
- SwordVerseKey *save = [(SwordVerseKey *)[self getKeyCopy] autorelease];
+ SwordVerseKey *save = (SwordVerseKey *)[self getKeyCopy];
SwordVerseKey *key = [SwordVerseKey verseKeyWithVersification:[self versification]];
[key setHeadings:YES];
Modified: trunk/bindings/objc/src/SwordBibleBook.h
===================================================================
--- trunk/bindings/objc/src/SwordBibleBook.h 2014-09-27 07:36:53 UTC (rev 3259)
+++ trunk/bindings/objc/src/SwordBibleBook.h 2014-10-03 08:17:45 UTC (rev 3260)
@@ -29,8 +29,8 @@
@property (readwrite) int number;
@property (readwrite) char numberInTestament;
@property (readwrite) char testament;
- at property (retain, readwrite) NSString *localizedName;
- at property (retain, readwrite) NSArray *chapters;
+ at property (strong, readwrite) NSString *localizedName;
+ at property (strong, readwrite) NSArray *chapters;
#ifdef __cplusplus
- (id)initWithBook:(sword::VersificationMgr::Book *)aBook;
Modified: trunk/bindings/objc/src/SwordBibleBook.mm
===================================================================
--- trunk/bindings/objc/src/SwordBibleBook.mm 2014-09-27 07:36:53 UTC (rev 3259)
+++ trunk/bindings/objc/src/SwordBibleBook.mm 2014-10-03 08:17:45 UTC (rev 3260)
@@ -57,15 +57,10 @@
return self;
}
-- (void)finalize {
- [super finalize];
-}
- (void)dealloc {
- [self setLocalizedName:nil];
[self setChapters:nil];
- [super dealloc];
}
- (NSString *)name {
@@ -85,8 +80,6 @@
}
- (void)setChapters:(NSArray *)anArray {
- [anArray retain];
- [chapters release];
chapters = anArray;
}
@@ -94,7 +87,7 @@
if(chapters == nil) {
NSMutableArray *temp = [NSMutableArray array];
for(int i = 0;i < swBook->getChapterMax();i++) {
- [temp addObject:[[[SwordBibleChapter alloc] initWithBook:self andChapter:i+1] autorelease]];
+ [temp addObject:[[SwordBibleChapter alloc] initWithBook:self andChapter:i+1]];
}
[self setChapters:[NSArray arrayWithArray:temp]];
}
Modified: trunk/bindings/objc/src/SwordBibleChapter.h
===================================================================
--- trunk/bindings/objc/src/SwordBibleChapter.h 2014-09-27 07:36:53 UTC (rev 3259)
+++ trunk/bindings/objc/src/SwordBibleChapter.h 2014-10-03 08:17:45 UTC (rev 3260)
@@ -12,12 +12,12 @@
@interface SwordBibleChapter : NSObject {
/** the back reference */
- SwordBibleBook *book;
+ SwordBibleBook *__unsafe_unretained book;
int number;
}
@property (readwrite) int number;
- at property (readwrite, assign) SwordBibleBook *book;
+ at property (readwrite, unsafe_unretained) SwordBibleBook *book;
- (id)initWithBook:(SwordBibleBook *)aBook andChapter:(int)aNumber;
Modified: trunk/bindings/objc/src/SwordBibleChapter.m
===================================================================
--- trunk/bindings/objc/src/SwordBibleChapter.m 2014-09-27 07:36:53 UTC (rev 3259)
+++ trunk/bindings/objc/src/SwordBibleChapter.m 2014-10-03 08:17:45 UTC (rev 3260)
@@ -24,12 +24,6 @@
return self;
}
-- (void)finalize {
- [super finalize];
-}
-- (void)dealloc {
- [super dealloc];
-}
@end
Modified: trunk/bindings/objc/src/SwordBibleTextEntry.h
===================================================================
--- trunk/bindings/objc/src/SwordBibleTextEntry.h 2014-09-27 07:36:53 UTC (rev 3259)
+++ trunk/bindings/objc/src/SwordBibleTextEntry.h 2014-10-03 08:17:45 UTC (rev 3260)
@@ -13,7 +13,7 @@
NSString *preVerseHeading;
}
- at property (readwrite, retain) NSString *preVerseHeading;
+ at property (readwrite, strong) NSString *preVerseHeading;
+ (id)textEntryForKey:(NSString *)aKey andText:(NSString *)aText;
- (id)initWithKey:(NSString *)aKey andText:(NSString *)aText;
Modified: trunk/bindings/objc/src/SwordBibleTextEntry.m
===================================================================
--- trunk/bindings/objc/src/SwordBibleTextEntry.m 2014-09-27 07:36:53 UTC (rev 3259)
+++ trunk/bindings/objc/src/SwordBibleTextEntry.m 2014-10-03 08:17:45 UTC (rev 3260)
@@ -13,7 +13,7 @@
@synthesize preVerseHeading;
+ (id)textEntryForKey:(NSString *)aKey andText:(NSString *)aText {
- return [[[SwordBibleTextEntry alloc] initWithKey:aKey andText:aText] autorelease];
+ return [[SwordBibleTextEntry alloc] initWithKey:aKey andText:aText];
}
- (id)initWithKey:(NSString *)aKey andText:(NSString *)aText {
@@ -25,14 +25,6 @@
return self;
}
-- (void)finalize {
- [super finalize];
-}
-- (void)dealloc {
- [self setPreVerseHeading:nil];
-
- [super dealloc];
-}
@end
Modified: trunk/bindings/objc/src/SwordBook.h
===================================================================
--- trunk/bindings/objc/src/SwordBook.h 2014-09-27 07:36:53 UTC (rev 3259)
+++ trunk/bindings/objc/src/SwordBook.h 2014-10-03 08:17:45 UTC (rev 3260)
@@ -26,7 +26,7 @@
NSMutableDictionary *contents;
}
- at property(readwrite, retain) NSMutableDictionary *contents;
+ at property(readwrite, strong) NSMutableDictionary *contents;
/**
return the tree content for the given treeKey
Modified: trunk/bindings/objc/src/SwordBook.mm
===================================================================
--- trunk/bindings/objc/src/SwordBook.mm 2014-09-27 07:36:53 UTC (rev 3259)
+++ trunk/bindings/objc/src/SwordBook.mm 2014-10-03 08:17:45 UTC (rev 3260)
@@ -42,15 +42,7 @@
return self;
}
-- (void)finalize {
- [super finalize];
-}
-- (void)dealloc {
- [self setContents:nil];
-
- [super dealloc];
-}
- (SwordModuleTreeEntry *)treeEntryForKey:(NSString *)treeKey {
SwordModuleTreeEntry * ret;
@@ -86,7 +78,7 @@
}
- (SwordModuleTreeEntry *)_treeEntryForKey:(sword::TreeKeyIdx *)treeKey {
- SwordModuleTreeEntry *ret = [[[SwordModuleTreeEntry alloc] init] autorelease];
+ SwordModuleTreeEntry *ret = [[SwordModuleTreeEntry alloc] init];
char *treeNodeName = (char *)treeKey->getText();
NSString *nName;
Modified: trunk/bindings/objc/src/SwordCommentary.mm
===================================================================
--- trunk/bindings/objc/src/SwordCommentary.mm 2014-09-27 07:36:53 UTC (rev 3259)
+++ trunk/bindings/objc/src/SwordCommentary.mm 2014-10-03 08:17:45 UTC (rev 3260)
@@ -69,12 +69,6 @@
return [super init];
}
-- (void)finalize {
- [super finalize];
-}
-- (void)dealloc {
- [super dealloc];
-}
@end
Modified: trunk/bindings/objc/src/SwordDictionary.mm
===================================================================
--- trunk/bindings/objc/src/SwordDictionary.mm 2014-09-27 07:36:53 UTC (rev 3259)
+++ trunk/bindings/objc/src/SwordDictionary.mm 2014-10-03 08:17:45 UTC (rev 3260)
@@ -15,7 +15,7 @@
@interface SwordDictionary (/* Private, class continuation */)
/** private property */
- at property(readwrite, retain) NSMutableArray *keys;
+ at property(readwrite, strong) NSMutableArray *keys;
@end
@interface SwordDictionary (PrivateAPI)
@@ -115,15 +115,7 @@
return self;
}
-- (void)finalize {
- [super finalize];
-}
-- (void)dealloc {
- [self setKeys:nil];
-
- [super dealloc];
-}
- (NSArray *)allKeys {
NSArray *ret = self.keys;
Modified: trunk/bindings/objc/src/SwordFilter.mm
===================================================================
--- trunk/bindings/objc/src/SwordFilter.mm 2014-09-27 07:36:53 UTC (rev 3259)
+++ trunk/bindings/objc/src/SwordFilter.mm 2014-10-03 08:17:45 UTC (rev 3260)
@@ -30,9 +30,6 @@
return self;
}
-- (void)dealloc {
- [super dealloc];
-}
- (sword::SWFilter *)swFilter {
return swFilter;
@@ -42,7 +39,7 @@
@implementation SwordOsisHtmlRefFilter
+ (SwordOsisHtmlRefFilter *)filter {
- return [[[SwordOsisHtmlRefFilter alloc] init] autorelease];
+ return [[SwordOsisHtmlRefFilter alloc] init];
}
- (id)init {
@@ -52,7 +49,7 @@
@implementation SwordOsisXHtmlFilter
+ (SwordOsisXHtmlFilter *)filter {
- return [[[SwordOsisXHtmlFilter alloc] init] autorelease];
+ return [[SwordOsisXHtmlFilter alloc] init];
}
- (id)init {
@@ -62,7 +59,7 @@
@implementation SwordOsisPlainFilter
+ (SwordOsisPlainFilter *)filter {
- return [[[SwordOsisPlainFilter alloc] init] autorelease];
+ return [[SwordOsisPlainFilter alloc] init];
}
- (id)init {
@@ -72,7 +69,7 @@
@implementation SwordThmlHtmlFilter
+ (SwordThmlHtmlFilter *)filter {
- return [[[SwordThmlHtmlFilter alloc] init] autorelease];
+ return [[SwordThmlHtmlFilter alloc] init];
}
- (id)init {
@@ -82,7 +79,7 @@
@implementation SwordThmlPlainFilter
+ (SwordThmlPlainFilter *)filter {
- return [[[SwordThmlPlainFilter alloc] init] autorelease];
+ return [[SwordThmlPlainFilter alloc] init];
}
- (id)init {
@@ -92,7 +89,7 @@
@implementation SwordGbfHtmlFilter
+ (SwordGbfHtmlFilter *)filter {
- return [[[SwordGbfHtmlFilter alloc] init] autorelease];
+ return [[SwordGbfHtmlFilter alloc] init];
}
- (id)init {
@@ -102,7 +99,7 @@
@implementation SwordGbfPlainFilter
+ (SwordGbfPlainFilter *)filter {
- return [[[SwordGbfPlainFilter alloc] init] autorelease];
+ return [[SwordGbfPlainFilter alloc] init];
}
- (id)init {
@@ -112,7 +109,7 @@
@implementation SwordTeiHtmlFilter
+ (SwordTeiHtmlFilter *)filter {
- return [[[SwordTeiHtmlFilter alloc] init] autorelease];
+ return [[SwordTeiHtmlFilter alloc] init];
}
- (id)init {
@@ -122,7 +119,7 @@
@implementation SwordTeiXHtmlFilter
+ (SwordTeiXHtmlFilter *)filter {
- return [[[SwordTeiXHtmlFilter alloc] init] autorelease];
+ return [[SwordTeiXHtmlFilter alloc] init];
}
- (id)init {
@@ -132,7 +129,7 @@
@implementation SwordTeiPlainFilter
+ (SwordTeiPlainFilter *)filter {
- return [[[SwordTeiPlainFilter alloc] init] autorelease];
+ return [[SwordTeiPlainFilter alloc] init];
}
- (id)init {
Modified: trunk/bindings/objc/src/SwordInstallSource.mm
===================================================================
--- trunk/bindings/objc/src/SwordInstallSource.mm 2014-09-27 07:36:53 UTC (rev 3259)
+++ trunk/bindings/objc/src/SwordInstallSource.mm 2014-10-03 08:17:45 UTC (rev 3260)
@@ -60,30 +60,16 @@
return self;
}
-- (void)finalize {
- if(temporarySource == NO) {
- //LogL(LOG_DEBUG, @"[SwordInstallSource -finalize] deleting swInstallSource");
- //delete swInstallSource;
- }
-
- [super finalize];
-}
-- (void)dealloc {
- [swordManager release];
- [super dealloc];
-}
- (void)setSwordManager:(SwordManager *)swManager {
- [swManager retain];
- [swordManager release];
swordManager = swManager;
}
// accessors
- (NSString *)caption {
const char *str = swInstallSource->caption;
- return [[[NSString alloc] initWithCString:str encoding:NSUTF8StringEncoding] autorelease];
+ return [[NSString alloc] initWithCString:str encoding:NSUTF8StringEncoding];
}
- (void)setCaption:(NSString *)aCaption {
@@ -92,7 +78,7 @@
- (NSString *)type {
const char *str = swInstallSource->type;
- return [[[NSString alloc] initWithCString:str encoding:NSUTF8StringEncoding] autorelease];
+ return [[NSString alloc] initWithCString:str encoding:NSUTF8StringEncoding];
}
- (void)setType:(NSString *)aType {
@@ -101,7 +87,7 @@
- (NSString *)source {
const char *str = swInstallSource->source;
- return [[[NSString alloc] initWithCString:str encoding:NSUTF8StringEncoding] autorelease];
+ return [[NSString alloc] initWithCString:str encoding:NSUTF8StringEncoding];
}
- (void)setSource:(NSString *)aSource {
@@ -110,7 +96,7 @@
- (NSString *)directory {
const char *str = swInstallSource->directory;
- return [[[NSString alloc] initWithCString:str encoding:NSUTF8StringEncoding] autorelease];
+ return [[NSString alloc] initWithCString:str encoding:NSUTF8StringEncoding];
}
- (void)setDirectory:(NSString *)aDir {
Modified: trunk/bindings/objc/src/SwordInstallSourceManager.h
===================================================================
--- trunk/bindings/objc/src/SwordInstallSourceManager.h 2014-09-27 07:36:53 UTC (rev 3259)
+++ trunk/bindings/objc/src/SwordInstallSourceManager.h 2014-10-03 08:17:45 UTC (rev 3260)
@@ -42,11 +42,11 @@
}
// ------------------- getter / setter -------------------
- at property (retain, readwrite) NSString *configPath;
- at property (retain, readwrite) NSString *configFilePath;
- at property (retain, readwrite) NSMutableArray *installSourceList;
+ at property (strong, readwrite) NSString *configPath;
+ at property (strong, readwrite) NSString *configFilePath;
+ at property (strong, readwrite) NSMutableArray *installSourceList;
/** Dictionary of InstallSources. Key: Caption */
- at property (retain, readwrite) NSMutableDictionary *installSources;
+ at property (strong, readwrite) NSMutableDictionary *installSources;
// -------------------- methods --------------------
Modified: trunk/bindings/objc/src/SwordInstallSourceManager.mm
===================================================================
--- trunk/bindings/objc/src/SwordInstallSourceManager.mm 2014-09-27 07:36:53 UTC (rev 3259)
+++ trunk/bindings/objc/src/SwordInstallSourceManager.mm 2014-10-03 08:17:45 UTC (rev 3260)
@@ -32,7 +32,6 @@
DLog(@"");
if(configPath != value) {
- [configPath release];
configPath = [value copy];
if(value == nil) {
@@ -60,7 +59,7 @@
config.Save();
// create default Install source
- SwordInstallSource *is = [[[SwordInstallSource alloc] initWithType:INSTALLSOURCE_TYPE_FTP] autorelease];
+ SwordInstallSource *is = [[SwordInstallSource alloc] initWithType:INSTALLSOURCE_TYPE_FTP];
[is setCaption:@"CrossWire"];
[is setSource:@"ftp.crosswire.org"];
[is setDirectory:@"/pub/sword/raw"];
@@ -100,7 +99,7 @@
}
+ (SwordInstallSourceManager *)controllerWithPath:(NSString *)aPath {
- return [[[SwordInstallSourceManager alloc] initWithPath:aPath createPath:YES] autorelease];
+ return [[SwordInstallSourceManager alloc] initWithPath:aPath createPath:YES];
}
/**
@@ -155,7 +154,7 @@
// init install sources
for(InstallSourceMap::iterator it = swInstallMgr->sources.begin(); it != swInstallMgr->sources.end(); it++) {
sword::InstallSource *sis = it->second;
- SwordInstallSource *is = [[[SwordInstallSource alloc] initWithSource:sis] autorelease];
+ SwordInstallSource *is = [[SwordInstallSource alloc] initWithSource:sis];
[self.installSources setObject:is forKey:[is caption]];
// also add to list
@@ -164,25 +163,14 @@
}
}
-- (void)finalize {
- if(swInstallMgr != nil) {
- delete swInstallMgr;
- }
- [super finalize];
-}
-
- (void)dealloc {
if(swInstallMgr != nil) {
delete swInstallMgr;
}
[self setConfigPath:nil];
- [self setInstallSources:nil];
- [self setInstallSourceList:nil];
- [self setConfigFilePath:nil];
- [super dealloc];
}
- (void)addInstallSource:(SwordInstallSource *)is {
@@ -309,7 +297,7 @@
module = it->first;
status = it->second;
- SwordModule *mod = [[[SwordModule alloc] initWithSWModule:module] autorelease];
+ SwordModule *mod = [[SwordModule alloc] initWithSWModule:module];
[mod setStatus:status];
[ar addObject:mod];
}
Modified: trunk/bindings/objc/src/SwordKey.mm
===================================================================
--- trunk/bindings/objc/src/SwordKey.mm 2014-09-27 07:36:53 UTC (rev 3259)
+++ trunk/bindings/objc/src/SwordKey.mm 2014-10-03 08:17:45 UTC (rev 3260)
@@ -12,19 +12,19 @@
@implementation SwordKey
+ (SwordKey *)swordKey {
- return [[[SwordKey alloc] init] autorelease];
+ return [[SwordKey alloc] init];
}
+ (SwordKey *)swordKeyWithRef:(NSString *)aRef {
- return [[[SwordKey alloc] initWithRef:aRef] autorelease];
+ return [[SwordKey alloc] initWithRef:aRef];
}
+ (SwordKey *)swordKeyWithSWKey:(sword::SWKey *)aSk {
- return [[[SwordKey alloc] initWithSWKey:aSk] autorelease];
+ return [[SwordKey alloc] initWithSWKey:aSk];
}
+ (SwordKey *)swordKeyWithSWKey:(sword::SWKey *)aSk makeCopy:(BOOL)copy {
- return [[[SwordKey alloc] initWithSWKey:aSk makeCopy:copy] autorelease];
+ return [[SwordKey alloc] initWithSWKey:aSk makeCopy:copy];
}
- (id)init {
@@ -63,20 +63,12 @@
return self;
}
-- (void)finalize {
- if(created) {
- delete sk;
- }
-
- [super finalize];
-}
- (void)dealloc {
if(created) {
delete sk;
}
- [super dealloc];
}
- (SwordKey *)clone {
Modified: trunk/bindings/objc/src/SwordListKey.mm
===================================================================
--- trunk/bindings/objc/src/SwordListKey.mm 2014-09-27 07:36:53 UTC (rev 3259)
+++ trunk/bindings/objc/src/SwordListKey.mm 2014-10-03 08:17:45 UTC (rev 3260)
@@ -11,23 +11,23 @@
@implementation SwordListKey
+ (SwordListKey *)listKeyWithRef:(NSString *)aRef {
- return [[[SwordListKey alloc] initWithRef:aRef] autorelease];
+ return [[SwordListKey alloc] initWithRef:aRef];
}
+ (SwordListKey *)listKeyWithRef:(NSString *)aRef v11n:(NSString *)scheme {
- return [[[SwordListKey alloc] initWithRef:aRef v11n:scheme] autorelease];
+ return [[SwordListKey alloc] initWithRef:aRef v11n:scheme];
}
+ (SwordListKey *)listKeyWithRef:(NSString *)aRef headings:(BOOL)headings v11n:(NSString *)scheme {
- return [[[SwordListKey alloc] initWithRef:aRef headings:headings v11n:scheme] autorelease];
+ return [[SwordListKey alloc] initWithRef:aRef headings:headings v11n:scheme];
}
+ (SwordListKey *)listKeyWithSWListKey:(sword::ListKey *)aLk {
- return [[[SwordListKey alloc] initWithSWListKey:aLk] autorelease];
+ return [[SwordListKey alloc] initWithSWListKey:aLk];
}
+ (SwordListKey *)listKeyWithSWListKey:(sword::ListKey *)aLk makeCopy:(BOOL)copy {
- return [[[SwordListKey alloc] initWithSWListKey:aLk makeCopy:copy] autorelease];
+ return [[SwordListKey alloc] initWithSWListKey:aLk makeCopy:copy];
}
- (id)init {
@@ -61,13 +61,7 @@
return (SwordListKey *) [super initWithSWKey:lk];
}
-- (void)finalize {
- [super finalize];
-}
-- (void)dealloc {
- [super dealloc];
-}
- (NSInteger)numberOfVerses {
NSInteger ret = 0;
@@ -87,7 +81,7 @@
}
- (VerseEnumerator *)verseEnumerator {
- return [[[VerseEnumerator alloc] initWithListKey:self] autorelease];
+ return [[VerseEnumerator alloc] initWithListKey:self];
}
- (BOOL)containsKey:(SwordVerseKey *)aVerseKey {
Modified: trunk/bindings/objc/src/SwordManager.h
===================================================================
--- trunk/bindings/objc/src/SwordManager.h 2014-09-27 07:36:53 UTC (rev 3259)
+++ trunk/bindings/objc/src/SwordManager.h 2014-10-03 08:17:45 UTC (rev 3260)
@@ -116,9 +116,9 @@
}
// ------------------- getter / setter -------------------
- at property (retain, readwrite) NSDictionary *modules;
- at property (retain, readwrite) NSString *modulesPath;
- at property (retain, readwrite) NSLock *managerLock;
+ at property (strong, readwrite) NSDictionary *modules;
+ at property (strong, readwrite) NSString *modulesPath;
+ at property (strong, readwrite) NSLock *managerLock;
@property (readwrite) BOOL temporaryManager;
// --------------------- methods -----------------------
Modified: trunk/bindings/objc/src/SwordManager.mm
===================================================================
--- trunk/bindings/objc/src/SwordManager.mm 2014-09-27 07:36:53 UTC (rev 3259)
+++ trunk/bindings/objc/src/SwordManager.mm 2014-10-03 08:17:45 UTC (rev 3260)
@@ -105,7 +105,7 @@
case sword::FMT_PLAIN:
default:
if(!plainFilter) {
- plainFilter = [filterProvider newHtmlPlainFilter];
+ plainFilter = [filterProvider newOsisPlainFilter];
}
[mod addRenderFilter:plainFilter];
break;
@@ -132,7 +132,7 @@
}
+ (SwordManager *)managerWithPath:(NSString *)path {
- SwordManager *manager = [[[SwordManager alloc] initWithPath:path] autorelease];
+ SwordManager *manager = [[SwordManager alloc] initWithPath:path];
return manager;
}
@@ -155,7 +155,7 @@
self.modulesPath = path;
self.modules = [NSDictionary dictionary];
- self.managerLock = (NSLock *)[[[NSRecursiveLock alloc] init] autorelease];
+ self.managerLock = (NSLock *)[[NSRecursiveLock alloc] init];
[self reInit];
@@ -177,7 +177,7 @@
temporaryManager = YES;
self.modules = [NSDictionary dictionary];
- self.managerLock = [(NSLock *)[[NSRecursiveLock alloc] init] autorelease];
+ self.managerLock = (NSLock *)[[NSRecursiveLock alloc] init];
[self refreshModules];
}
@@ -185,32 +185,12 @@
return self;
}
-- (void)finalize {
- if(!temporaryManager) {
- delete swManager;
- }
-
- [super finalize];
-}
- (void)dealloc {
if(!temporaryManager) {
delete swManager;
}
- [self setModules:nil];
- [self setModulesPath:nil];
- [self setManagerLock:nil];
- [gbfFilter release];
- [gbfStripFilter release];
- [thmlFilter release];
- [thmlStripFilter release];
- [osisFilter release];
- [osisStripFilter release];
- [teiFilter release];
- [teiStripFilter release];
- [plainFilter release];
- [super dealloc];
}
- (void)reInit {
@@ -336,7 +316,7 @@
}
// sort
- NSArray *sortDescriptors = [NSArray arrayWithObject:[[[NSSortDescriptor alloc] initWithKey:@"name" ascending:YES] autorelease]];
+ NSArray *sortDescriptors = [NSArray arrayWithObject:[[NSSortDescriptor alloc] initWithKey:@"name" ascending:YES]];
[ret sortUsingDescriptors:sortDescriptors];
return [NSArray arrayWithArray:ret];
@@ -351,7 +331,7 @@
}
// sort
- NSArray *sortDescriptors = [NSArray arrayWithObject:[[[NSSortDescriptor alloc] initWithKey:@"name" ascending:YES] autorelease]];
+ NSArray *sortDescriptors = [NSArray arrayWithObject:[[NSSortDescriptor alloc] initWithKey:@"name" ascending:YES]];
[ret sortUsingDescriptors:sortDescriptors];
return [NSArray arrayWithArray:ret];
@@ -366,7 +346,7 @@
}
// sort
- NSArray *sortDescriptors = [NSArray arrayWithObject:[[[NSSortDescriptor alloc] initWithKey:@"name" ascending:YES] autorelease]];
+ NSArray *sortDescriptors = [NSArray arrayWithObject:[[NSSortDescriptor alloc] initWithKey:@"name" ascending:YES]];
[ret sortUsingDescriptors:sortDescriptors];
return [NSArray arrayWithArray:ret];
Modified: trunk/bindings/objc/src/SwordModule+Index.mm
===================================================================
--- trunk/bindings/objc/src/SwordModule+Index.mm 2014-09-27 07:36:53 UTC (rev 3259)
+++ trunk/bindings/objc/src/SwordModule+Index.mm 2014-10-03 08:17:45 UTC (rev 3260)
@@ -41,7 +41,6 @@
NSString *keyString = [NSString stringWithUTF8String:results.getText()];
SwordModuleTextEntry *entry = [SwordModuleTextEntry textEntryForKey:keyString andText:nil];
[retArray addObject:entry];
- [entry release];
results++;
}
}
Modified: trunk/bindings/objc/src/SwordModule.h
===================================================================
--- trunk/bindings/objc/src/SwordModule.h 2014-09-27 07:36:53 UTC (rev 3259)
+++ trunk/bindings/objc/src/SwordModule.h 2014-10-03 08:17:45 UTC (rev 3260)
@@ -91,15 +91,15 @@
// ------------- properties ---------------
@property (readwrite) ModuleType type;
@property (readwrite) int status;
- at property (retain, readwrite) NSRecursiveLock *moduleLock;
- at property (retain, readwrite) NSLock *indexLock;
- at property (retain, readwrite) SwordManager *swManager;
+ at property (strong, readwrite) NSRecursiveLock *moduleLock;
+ at property (strong, readwrite) NSLock *indexLock;
+ at property (strong, readwrite) SwordManager *swManager;
// swmodule properties
- at property (retain, readonly) NSString *name;
- at property (retain, readonly) NSString *typeString;
- at property (retain, readonly) NSString *descr;
- at property (retain, readonly) NSString *lang;
+ at property (strong, readonly) NSString *name;
+ at property (strong, readonly) NSString *typeString;
+ at property (strong, readonly) NSString *descr;
+ at property (strong, readonly) NSString *lang;
#ifdef __cplusplus
Modified: trunk/bindings/objc/src/SwordModule.mm
===================================================================
--- trunk/bindings/objc/src/SwordModule.mm 2014-09-27 07:36:53 UTC (rev 3259)
+++ trunk/bindings/objc/src/SwordModule.mm 2014-10-03 08:17:45 UTC (rev 3260)
@@ -24,11 +24,11 @@
@interface SwordModule ()
- at property (retain, readwrite) NSString *name;
- at property (retain, readwrite) NSString *typeString;
- at property (retain, readwrite) NSString *descr;
- at property (retain, readwrite) NSString *lang;
- at property(readwrite, retain) NSMutableDictionary *configEntries;
+ at property (strong, readwrite) NSString *name;
+ at property (strong, readwrite) NSString *typeString;
+ at property (strong, readwrite) NSString *descr;
+ at property (strong, readwrite) NSString *lang;
+ at property(readwrite, strong) NSMutableDictionary *configEntries;
- (void)mainInit;
@@ -49,25 +49,25 @@
+ (id)moduleForSWModule:(sword::SWModule *)aModule {
- return [[[SwordModule alloc] initWithSWModule:aModule] autorelease];
+ return [[SwordModule alloc] initWithSWModule:aModule];
}
+ (id)moduleForSWModule:(sword::SWModule *)aModule swordManager:(SwordManager *)aManager {
- return [[[SwordModule alloc] initWithSWModule:aModule swordManager:aManager] autorelease];
+ return [[SwordModule alloc] initWithSWModule:aModule swordManager:aManager];
}
+ (id)moduleForType:(ModuleType)aType swModule:(sword::SWModule *)swModule swordManager:(SwordManager *)aManager {
SwordModule *sm;
if(aType == Bible) {
- sm = [[[SwordBible alloc] initWithSWModule:swModule swordManager:aManager] autorelease];
+ sm = [[SwordBible alloc] initWithSWModule:swModule swordManager:aManager];
} else if(aType == Commentary) {
- sm = [[[SwordCommentary alloc] initWithSWModule:swModule swordManager:aManager] autorelease];
+ sm = [[SwordCommentary alloc] initWithSWModule:swModule swordManager:aManager];
} else if(aType == Dictionary) {
- sm = [[[SwordDictionary alloc] initWithSWModule:swModule swordManager:aManager] autorelease];
+ sm = [[SwordDictionary alloc] initWithSWModule:swModule swordManager:aManager];
} else if(aType == Genbook) {
- sm = [[[SwordBook alloc] initWithSWModule:swModule swordManager:aManager] autorelease];
+ sm = [[SwordBook alloc] initWithSWModule:swModule swordManager:aManager];
} else {
- sm = [[[SwordModule alloc] initWithSWModule:swModule swordManager:aManager] autorelease];
+ sm = [[SwordModule alloc] initWithSWModule:swModule swordManager:aManager];
}
return sm;
@@ -129,8 +129,8 @@
self.lang = [self retrieveLang];
self.type = [SwordModule moduleTypeForModuleTypeString:self.typeString];
- self.moduleLock = [[[NSRecursiveLock alloc] init] autorelease];
- self.indexLock = [[[NSLock alloc] init] autorelease];
+ self.moduleLock = [[NSRecursiveLock alloc] init];
+ self.indexLock = [[NSLock alloc] init];
self.configEntries = [NSMutableDictionary dictionary];
}
@@ -162,23 +162,8 @@
return self;
}
-- (void)finalize {
- [super finalize];
-}
-- (void)dealloc {
- [self setConfigEntries:nil];
- [self setSwManager:nil];
- [self setModuleLock:nil];
- [self setIndexLock:nil];
- [self setName:nil];
- [self setDescr:nil];
- [self setTypeString:nil];
- [self setLang:nil];
- [super dealloc];
-}
-
#pragma mark - Filters
- (void)addRenderFilter:(SwordFilter *)aFilter {
@@ -202,7 +187,7 @@
#pragma mark - Conf entries
- (NSAttributedString *)fullAboutText {
- return [[[NSAttributedString alloc] initWithString:@""] autorelease];
+ return [[NSAttributedString alloc] initWithString:@""];
}
- (NSInteger)error {
@@ -311,7 +296,7 @@
[aboutText replaceOccurrencesOfString:@"\\pard" withString:@"" options:0 range:NSMakeRange(0, [aboutText length])];
[aboutText replaceOccurrencesOfString:@"\\par" withString:@"\n" options:0 range:NSMakeRange(0, [aboutText length])];
- NSMutableString *retStr = [[@"" mutableCopy] autorelease];
+ NSMutableString *retStr = [@"" mutableCopy];
for(NSUInteger i=0; i<[aboutText length]; i++) {
unichar c = [aboutText characterAtIndex:i];
@@ -321,7 +306,7 @@
//we have an unicode character!
@try {
NSInteger unicodeChar = 0;
- NSMutableString *unicodeCharString = [[@"" mutableCopy] autorelease];
+ NSMutableString *unicodeCharString = [@"" mutableCopy];
int j = 0;
BOOL negative = NO;
if ([aboutText characterAtIndex:(i+2)] == '-') {
Modified: trunk/bindings/objc/src/SwordModuleTextEntry.h
===================================================================
--- trunk/bindings/objc/src/SwordModuleTextEntry.h 2014-09-27 07:36:53 UTC (rev 3259)
+++ trunk/bindings/objc/src/SwordModuleTextEntry.h 2014-10-03 08:17:45 UTC (rev 3260)
@@ -15,8 +15,8 @@
NSString *text;
}
- at property (readwrite, retain) NSString *key;
- at property (readwrite, retain) NSString *text;
+ at property (readwrite, strong) NSString *key;
+ at property (readwrite, strong) NSString *text;
+ (id)textEntryForKey:(NSString *)aKey andText:(NSString *)aText;
- (id)initWithKey:(NSString *)aKey andText:(NSString *)aText;
Modified: trunk/bindings/objc/src/SwordModuleTextEntry.m
===================================================================
--- trunk/bindings/objc/src/SwordModuleTextEntry.m 2014-09-27 07:36:53 UTC (rev 3259)
+++ trunk/bindings/objc/src/SwordModuleTextEntry.m 2014-10-03 08:17:45 UTC (rev 3260)
@@ -15,7 +15,7 @@
@synthesize text;
+ (id)textEntryForKey:(NSString *)aKey andText:(NSString *)aText {
- return [[[SwordModuleTextEntry alloc] initWithKey:aKey andText:aText] autorelease];
+ return [[SwordModuleTextEntry alloc] initWithKey:aKey andText:aText];
}
- (id)initWithKey:(NSString *)aKey andText:(NSString *)aText {
@@ -28,15 +28,6 @@
return self;
}
-- (void)finalize {
- [super finalize];
-}
-- (void)dealloc {
- [self setKey:nil];
- [self setText:nil];
-
- [super dealloc];
-}
@end
Modified: trunk/bindings/objc/src/SwordModuleTreeEntry.h
===================================================================
--- trunk/bindings/objc/src/SwordModuleTreeEntry.h 2014-09-27 07:36:53 UTC (rev 3259)
+++ trunk/bindings/objc/src/SwordModuleTreeEntry.h 2014-10-03 08:17:45 UTC (rev 3260)
@@ -14,8 +14,8 @@
NSArray *content;
}
- at property (retain, readwrite) NSString *key;
- at property (retain, readwrite) NSArray *content;
+ at property (strong, readwrite) NSString *key;
+ at property (strong, readwrite) NSArray *content;
- (id)initWithKey:(NSString *)aKey content:(NSArray *)aContent;
Modified: trunk/bindings/objc/src/SwordModuleTreeEntry.m
===================================================================
--- trunk/bindings/objc/src/SwordModuleTreeEntry.m 2014-09-27 07:36:53 UTC (rev 3259)
+++ trunk/bindings/objc/src/SwordModuleTreeEntry.m 2014-10-03 08:17:45 UTC (rev 3260)
@@ -24,15 +24,6 @@
return self;
}
-- (void)finalize {
- [super finalize];
-}
-- (void)dealloc {
- [self setKey:nil];
- [self setContent:nil];
-
- [super dealloc];
-}
@end
Modified: trunk/bindings/objc/src/SwordVerseKey.mm
===================================================================
--- trunk/bindings/objc/src/SwordVerseKey.mm 2014-09-27 07:36:53 UTC (rev 3259)
+++ trunk/bindings/objc/src/SwordVerseKey.mm 2014-10-03 08:17:45 UTC (rev 3260)
@@ -12,27 +12,27 @@
@implementation SwordVerseKey
+ (SwordVerseKey *)verseKey {
- return [[[SwordVerseKey alloc] init] autorelease];
+ return [[SwordVerseKey alloc] init];
}
+ (SwordVerseKey *)verseKeyWithVersification:(NSString *)scheme {
- return [[[SwordVerseKey alloc] initWithVersification:scheme] autorelease];
+ return [[SwordVerseKey alloc] initWithVersification:scheme];
}
+ (SwordVerseKey *)verseKeyWithRef:(NSString *)aRef {
- return [[[SwordVerseKey alloc] initWithRef:aRef] autorelease];
+ return [[SwordVerseKey alloc] initWithRef:aRef];
}
+ (SwordVerseKey *)verseKeyWithRef:(NSString *)aRef v11n:(NSString *)scheme {
- return [[[SwordVerseKey alloc] initWithRef:aRef v11n:scheme] autorelease];
+ return [[SwordVerseKey alloc] initWithRef:aRef v11n:scheme];
}
+ (SwordVerseKey *)verseKeyWithSWVerseKey:(sword::VerseKey *)aVk {
- return [[[SwordVerseKey alloc] initWithSWVerseKey:aVk] autorelease];
+ return [[SwordVerseKey alloc] initWithSWVerseKey:aVk];
}
+ (SwordVerseKey *)verseKeyWithSWVerseKey:(sword::VerseKey *)aVk makeCopy:(BOOL)copy {
- return [[[SwordVerseKey alloc] initWithSWVerseKey:aVk makeCopy:copy] autorelease];
+ return [[SwordVerseKey alloc] initWithSWVerseKey:aVk makeCopy:copy];
}
- (id)init {
@@ -76,13 +76,7 @@
return self;
}
-- (void)finalize {
- [super finalize];
-}
-- (void)dealloc {
- [super dealloc];
-}
- (SwordKey *)clone {
return [SwordVerseKey verseKeyWithSWVerseKey:(sword::VerseKey *)sk];
Modified: trunk/bindings/objc/src/SwordVerseManager.mm
===================================================================
--- trunk/bindings/objc/src/SwordVerseManager.mm 2014-09-27 07:36:53 UTC (rev 3259)
+++ trunk/bindings/objc/src/SwordVerseManager.mm 2014-10-03 08:17:45 UTC (rev 3260)
@@ -12,7 +12,7 @@
@interface SwordVerseManager ()
- at property (retain, readwrite) NSMutableDictionary *booksPerVersification;
+ at property (strong, readwrite) NSMutableDictionary *booksPerVersification;
@end
@@ -39,15 +39,7 @@
return self;
}
-- (void)finalize {
- [super finalize];
-}
-- (void)dealloc {
- [self setBooksPerVersification:nil];
-
- [super dealloc];
-}
/** convenience method that returns the books for default scheme (KJV) */
- (NSArray *)books {
@@ -65,7 +57,7 @@
for(int i = 0;i < bookCount;i++) {
sword::VersificationMgr::Book *book = (sword::VersificationMgr::Book *)system->getBook(i);
- SwordBibleBook *bb = [[[SwordBibleBook alloc] initWithBook:book] autorelease];
+ SwordBibleBook *bb = [[SwordBibleBook alloc] initWithBook:book];
[bb setNumber:i+1]; // VerseKey-Book() starts at index 1
// add to array
Modified: trunk/bindings/objc/src/VerseEnumerator.mm
===================================================================
--- trunk/bindings/objc/src/VerseEnumerator.mm 2014-09-27 07:36:53 UTC (rev 3259)
+++ trunk/bindings/objc/src/VerseEnumerator.mm 2014-10-03 08:17:45 UTC (rev 3260)
@@ -10,7 +10,7 @@
#import "SwordListKey.h"
@interface VerseEnumerator ()
- at property (retain, readwrite) SwordListKey *listKey;
+ at property (strong, readwrite) SwordListKey *listKey;
@end
@implementation VerseEnumerator
@@ -26,14 +26,7 @@
return self;
}
-- (void)finalize {
- [super finalize];
-}
-- (void)dealloc {
- [listKey release];
- [super dealloc];
-}
- (NSArray *)allObjects {
NSMutableArray *t = [NSMutableArray array];
Modified: trunk/bindings/objc/src/services/Configuration.m
===================================================================
--- trunk/bindings/objc/src/services/Configuration.m 2014-09-27 07:36:53 UTC (rev 3259)
+++ trunk/bindings/objc/src/services/Configuration.m 2014-10-03 08:17:45 UTC (rev 3260)
@@ -27,19 +27,10 @@
return [super init];
}
-- (void)finalize {
- [super finalize];
-}
-- (void)dealloc {
- [impl release];
- [super dealloc];
-}
-
- (void)setImpl:(id<Configuration>)configImpl {
impl = (Configuration *)configImpl;
- [impl retain];
}
#pragma mark Configuration implementation
More information about the sword-cvs
mailing list