Index: src/OFObject.m ================================================================== --- src/OFObject.m +++ src/OFObject.m @@ -330,10 +330,14 @@ #endif instance = (OFObject *)(void *)((char *)instance + PRE_IVARS_ALIGN); if (!objc_constructInstance(class, instance)) { +#if !defined(OF_HAVE_ATOMIC_OPS) && !defined(OF_AMIGAOS) + OFSpinlockFree(&((struct PreIvars *)(void *) + ((char *)instance - PRE_IVARS_ALIGN))->retainCountSpinlock); +#endif free((char *)instance - PRE_IVARS_ALIGN); @throw [OFInitializationFailedException exceptionWithClass: class]; } @@ -1200,10 +1204,14 @@ } - (void)dealloc { objc_destructInstance(self); + +#if !defined(OF_HAVE_ATOMIC_OPS) && !defined(OF_AMIGAOS) + OFSpinlockFree(&PRE_IVARS->retainCountSpinlock); +#endif free((char *)self - PRE_IVARS_ALIGN); } /* Required to use properties with the Apple runtime */