1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
|
@throw [OFNotImplementedException exceptionWithSelector: selector
object: self];
}
- (instancetype)retain
{
#if defined(OF_HAVE_ATOMIC_OPS)
of_atomic_int_inc(&PRE_IVARS->retainCount);
#elif defined(OF_AMIGAOS)
/*
* On AmigaOS, we can only have one CPU. As increasing a variable is a
* single instruction on M68K, we don't need Forbid() / Permit() on
* M68K.
*/
# ifndef OF_AMIGAOS_M68K
|
|
|
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
|
@throw [OFNotImplementedException exceptionWithSelector: selector
object: self];
}
- (instancetype)retain
{
#if defined(OF_HAVE_ATOMIC_OPS)
OFAtomicIntIncrease(&PRE_IVARS->retainCount);
#elif defined(OF_AMIGAOS)
/*
* On AmigaOS, we can only have one CPU. As increasing a variable is a
* single instruction on M68K, we don't need Forbid() / Permit() on
* M68K.
*/
# ifndef OF_AMIGAOS_M68K
|
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
|
}
- (void)release
{
#if defined(OF_HAVE_ATOMIC_OPS)
of_memory_barrier_release();
if (of_atomic_int_dec(&PRE_IVARS->retainCount) <= 0) {
of_memory_barrier_acquire();
[self dealloc];
}
#elif defined(OF_AMIGAOS)
int retainCount;
|
|
|
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
|
}
- (void)release
{
#if defined(OF_HAVE_ATOMIC_OPS)
of_memory_barrier_release();
if (OFAtomicIntDecrease(&PRE_IVARS->retainCount) <= 0) {
of_memory_barrier_acquire();
[self dealloc];
}
#elif defined(OF_AMIGAOS)
int retainCount;
|