Skip to content

Commit 76f0a46

Browse files
author
Zach Drayer
committed
Initialize object to nil, don't use properties in init
1 parent 0f826fe commit 76f0a46

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Hpple.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@
119119
children = (
120120
32CA4F630368D1EE00C91783 /* Hpple_Prefix.pch */,
121121
29B97316FDCFA39411CA2CEA /* main.m */,
122-
75D786350F34E8A600173CB6 /* libxml2.2.dylib */,
123122
);
124123
name = "Other Sources";
125124
sourceTree = "<group>";
@@ -136,6 +135,7 @@
136135
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
137136
isa = PBXGroup;
138137
children = (
138+
75D786350F34E8A600173CB6 /* libxml2.2.dylib */,
139139
1DF5F4DF0D08C38300B7A737 /* UIKit.framework */,
140140
1D30AB110D05D00D00671497 /* Foundation.framework */,
141141
288765FC0DF74451002DB57D /* CoreGraphics.framework */,

TFHpple.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ - (id) initWithData:(NSData *)theData isXML:(BOOL)isDataXML
4545
if (!(self = [super init]))
4646
return nil;
4747

48-
self.data = theData;
48+
[theData retain];
49+
data = theData;
4950
isXML = isDataXML;
5051

5152
return self;
@@ -64,7 +65,7 @@ - (id) initWithHTMLData:(NSData *)theData
6465
// Returns all elements at xPath.
6566
- (NSArray *) search:(NSString *)xPathOrCSS
6667
{
67-
NSArray * detailNodes;
68+
NSArray * detailNodes = nil;
6869
if (isXML) {
6970
detailNodes = PerformXMLXPathQuery(data, xPathOrCSS);
7071
} else {

TFHppleElement.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ @implementation TFHppleElement
4040
- (void) dealloc
4141
{
4242
[node release];
43-
4443
[super dealloc];
4544
}
4645

0 commit comments

Comments
 (0)