 {
   let queue: DispatchQueue
 
-  private var resolved: Result<Value, Error>?
   private var deferredState = UnsafeMutablePointer<AtomicInt>.allocate(capacity: 1)
 
   deinit
   {
     let s = CAtomicsLoad(deferredState, .acquire)
-    if !s.isResolved, let w = s.waiters
+    if s.isResolved
+    {
+      let r = s.result.assumingMemoryBound(to: Result<Value, Error>.self)
+      r.deinitialize(count: 1)
+      r.deallocate()
+    }
+    else if let w = s.waiters
     {
       deallocateWaiters(w.assumingMemoryBound(to: Waiter<Value>.self))
     }

  /// - returns: this `Deferred`'s `Result`

  public var result: Result<Value, Error> {
    if CAtomicsLoad(deferredState, .acquire).isResolved == false
    {
      if let current = DispatchQoS.QoSClass.current, current > queue.qos.qosClass
      { // try to boost the QoS class of the running task if it is lower than the current thread's QoS

  public init(queue: DispatchQueue, task: @escaping () throws -> Value)
  {
    self.queue = queue
    CAtomicsInitialize(deferredState, .executing)

    queue.async {
