Swiftgram/SwiftSignalKitTests/DeallocatingObject.swift
2016-06-19 15:19:00 +03:00

20 lines
392 B
Swift

import Foundation
internal class DeallocatingObject : CustomStringConvertible {
private var deallocated: UnsafeMutablePointer<Bool>
init(deallocated: UnsafeMutablePointer<Bool>) {
self.deallocated = deallocated
}
deinit {
self.deallocated.pointee = true
}
var description: String {
get {
return ""
}
}
}