             return base.value
         }
         set {
-            defer { _fixLifetime(base) }
-            _fetchStore(AtomicBase(value: newValue))
+            _fetchStore(Base(value: newValue))
         }
     }
 }
 
 extension Atomic {
     
-    public mutating func isLockFree() -> Bool {
-        return withUnsafeMutablePointer(to: &base) { $0.withMemoryRebound(to: Optional<UnsafeRawPointer>.self, capacity: 1) { _AtomicPtrIsLockFree($0) } }
-    }
+    private class Base {
+        
+        var value: Instance
+        
+        init(value: Instance) {
+            self.value = value
+        }
+    }
+}
+
+extension Atomic {
     
     @_transparent
-    private mutating func _fetch() -> AtomicBase<Instance> {
-        let result = withUnsafeMutablePointer(to: &base) { $0.withMemoryRebound(to: Optional<UnsafeRawPointer>.self, capacity: 1) { _AtomicLoadPtrBarrier($0) } }
-        let _old = Unmanaged<AtomicBase<Instance>>.fromOpaque(UnsafeRawPointer(result!))
-        return _old.takeUnretainedValue()
-    }
-    
-    @_transparent
-    private mutating func _compareSet(old: AtomicBase<Instance>, new: AtomicBase<Instance>) -> Bool {
+    private mutating func withBasePointer<Result, Raw>(_ body: (UnsafeMutablePointer<Raw>) -> Result) -> Result {
+        return withUnsafeMutablePointer(to: &base) { $0.withMemoryRebound(to: Raw.self, capacity: 1) { body($0) } }
+    }
+    
+    @inline(never)
+    public mutating func isLockFree() -> Bool {
+        return withBasePointer { _AtomicPtrIsLockFree($0) }
+    }
+    
+    @inline(never)
+    private mutating func _fetch() -> Base {
+        return withBasePointer { Unmanaged<Base>.fromOpaque(UnsafeRawPointer(_AtomicLoadPtrBarrier($0))).takeUnretainedValue() }
+    }
+    
+    @inline(never)
+    private mutating func _compareSet(old: Base, new: Base) -> Bool {
         let _old = Unmanaged.passUnretained(old)
         let _new = Unmanaged.passRetained(new)
-        let result = withUnsafeMutablePointer(to: &base) { $0.withMemoryRebound(to: Optional<UnsafeMutableRawPointer>.self, capacity: 1) { _AtomicCompareAndSwapPtrBarrier(_old.toOpaque(), _new.toOpaque(), $0) } }
+        let result = withBasePointer { _AtomicCompareAndSwapPtrBarrier(_old.toOpaque(), _new.toOpaque(), $0) }
         if result {
             _old.release()
         } else {

        return result
    }
    
    @_transparent
    private mutating func _compareSetWeak(old: AtomicBase<Instance>, new: AtomicBase<Instance>) -> Bool {
        let _old = Unmanaged.passUnretained(old)
        let _new = Unmanaged.passRetained(new)
        let result = withUnsafeMutablePointer(to: &base) { $0.withMemoryRebound(to: Optional<UnsafeMutableRawPointer>.self, capacity: 1) { _AtomicCompareAndSwapWeakPtrBarrier(_old.toOpaque(), _new.toOpaque(), $0) } }
        if result {
            _old.release()
        } else {

    
    /// Atomic fetch the current value.
    public mutating func fetchSelf() -> (current: Atomic, value: Instance) {
        let _base = self._fetch()
        return (Atomic(base: _base), _base.value)
    }
    
    /// Compare and set the value.
    public mutating func compareSet(old: Atomic, new: Instance) -> Bool {
        return self._compareSet(old: old.base, new: Base(value: new))
    }
    
    /// Set the value, and returns the previous value.
    public mutating func fetchStore(_ new: Instance) -> Instance {
        return self._fetchStore(Base(value: new)).value
    }
    
    /// Set the value.
    @discardableResult
    public mutating func fetchStore(block: (Instance) throws -> Instance) rethrows -> Instance {
        let new = Base(value: base.value)
        while true {
            let _base = self._fetch()
            new.value = try block(_base.value)
            if self._compareSetWeak(old: _base, new: new) {
                return _base.value
            }
        }
    }
