mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 08:41:03 +00:00
Use release' and
dealloc' instead of `free'.
(read:, write:): Removed. (initialize): return void. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@100 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f4a90fbaa8
commit
59d184febb
1 changed files with 10 additions and 27 deletions
|
@ -30,16 +30,15 @@
|
||||||
|
|
||||||
@implementation Collection
|
@implementation Collection
|
||||||
|
|
||||||
+ initialize
|
+ (void) initialize
|
||||||
{
|
{
|
||||||
if (self == [Collection class])
|
if (self == [Collection class])
|
||||||
{
|
{
|
||||||
[self setVersion:0]; // beta release;
|
[self setVersion:0]; // beta release;
|
||||||
}
|
}
|
||||||
return self;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// INITIALIZING AND FREEING;
|
// INITIALIZING AND RELEASING;
|
||||||
|
|
||||||
// This is the designated initializer of this class;
|
// This is the designated initializer of this class;
|
||||||
- initWithType:(const char *)contentEncoding
|
- initWithType:(const char *)contentEncoding
|
||||||
|
@ -66,17 +65,17 @@
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
- free
|
- (void) dealloc
|
||||||
{
|
{
|
||||||
// ?;
|
// ?;
|
||||||
return [super free];
|
[super dealloc];
|
||||||
}
|
}
|
||||||
|
|
||||||
/* May be inefficient. Could be overridden; */
|
/* May be inefficient. Could be overridden; */
|
||||||
- freeObjects
|
- releaseObjects
|
||||||
{
|
{
|
||||||
if (CONTAINS_OBJECTS)
|
if (CONTAINS_OBJECTS)
|
||||||
[self safeMakeObjectsPerform:@selector(free)];
|
[self safeMakeObjectsPerform:@selector(release)];
|
||||||
[self empty];
|
[self empty];
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
@ -257,7 +256,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This must work without sending any messages to content objects.
|
/* This must work without sending any messages to content objects.
|
||||||
Content objects already may be -free'd when this is executed. */
|
Content objects already may be dealloc'd when this is executed. */
|
||||||
- empty
|
- empty
|
||||||
{
|
{
|
||||||
[self subclassResponsibility:_cmd];
|
[self subclassResponsibility:_cmd];
|
||||||
|
@ -319,7 +318,7 @@
|
||||||
flag = NO;
|
flag = NO;
|
||||||
else
|
else
|
||||||
flag = YES;
|
flag = YES;
|
||||||
[bag free];
|
[bag release];
|
||||||
return flag;
|
return flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -539,7 +538,7 @@
|
||||||
{
|
{
|
||||||
id tmp = [[Array alloc] initWithContentsOf:self];
|
id tmp = [[Array alloc] initWithContentsOf:self];
|
||||||
[tmp withElementsCall:aFunc];
|
[tmp withElementsCall:aFunc];
|
||||||
[tmp free];
|
[tmp release];
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -547,7 +546,7 @@
|
||||||
{
|
{
|
||||||
id tmp = [[Array alloc] initWithContentsOf:self];
|
id tmp = [[Array alloc] initWithContentsOf:self];
|
||||||
[tmp withElementsCall:aFunc whileTrue:flag];
|
[tmp withElementsCall:aFunc whileTrue:flag];
|
||||||
[tmp free];
|
[tmp release];
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1205,22 +1204,6 @@ for info about latest version.",
|
||||||
return licenseString;
|
return licenseString;
|
||||||
}
|
}
|
||||||
|
|
||||||
- write: (TypedStream*)aStream
|
|
||||||
{
|
|
||||||
[super write: aStream];
|
|
||||||
[self _writeInit:aStream];
|
|
||||||
[self _writeContents:aStream];
|
|
||||||
return self;
|
|
||||||
}
|
|
||||||
|
|
||||||
- read: (TypedStream*)aStream
|
|
||||||
{
|
|
||||||
[super read: aStream];
|
|
||||||
[self _readInit:aStream];
|
|
||||||
[self _readContents:aStream];
|
|
||||||
return self;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void) encodeWithCoder: (Coder*)aCoder
|
- (void) encodeWithCoder: (Coder*)aCoder
|
||||||
{
|
{
|
||||||
[self _encodeCollectionWithCoder:aCoder];
|
[self _encodeCollectionWithCoder:aCoder];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue