mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
Retain/Release and DO patches from Richard Frith-MacDonald
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2571 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
6a21926d00
commit
d88b91f6bb
25 changed files with 697 additions and 134 deletions
|
@ -39,9 +39,6 @@
|
|||
+ (id) allocWithZone: (NSZone*)z
|
||||
{
|
||||
NSProxy* ob = (NSProxy*) NSAllocateObject (self, 0, z);
|
||||
if (ob) {
|
||||
[ob retain];
|
||||
}
|
||||
return ob;
|
||||
}
|
||||
|
||||
|
@ -217,7 +214,7 @@
|
|||
|
||||
- (void) release
|
||||
{
|
||||
if (_retain_count-- == 1) {
|
||||
if (_retain_count-- == 0) {
|
||||
[self dealloc];
|
||||
}
|
||||
}
|
||||
|
@ -247,7 +244,12 @@
|
|||
|
||||
- (unsigned int) retainCount
|
||||
{
|
||||
return _retain_count;
|
||||
return _retain_count + 1;
|
||||
}
|
||||
|
||||
+ (unsigned) retainCount
|
||||
{
|
||||
return UINT_MAX;
|
||||
}
|
||||
|
||||
- self
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue