     /// - Warning:
     /// If `unsafeObservable` sends multiple values synchronously,
     /// the last value will be treated as initial value of `Property`.
-    public init(unsafeObservable: Observable<E>) {
-        let disposeBag = DisposeBag()
-        _disposeBag = disposeBag
-
+    public convenience init(unsafeObservable: Observable<E>) {
         let observable = unsafeObservable.share(replay: 1, scope: .whileConnected)
         var initial: E? = nil
 
-        observable
+        let initialDisposable = observable
             .subscribe(onNext: { initial = $0 })
-            .disposed(by: disposeBag)
 
         guard let initial_ = initial else {
             fatalError("An unsafeObservable promised to send at least one value. Received none.")
         }
 
-        _variable = Variable(initial_)
+        self.init(initial: initial_, then: observable)
 
-        observable
-            .bind(to: _variable)
-            .disposed(by: disposeBag)
+        initialDisposable.dispose()
     }
 
     /// Initializes with `initial` element and then `observable`.


    public typealias E = Element

    private let _variable: Variable<E>
    private let _disposeBag: DisposeBag?

    /// Gets current value.
    public var value: E {
        get {
            return _variable.value
        }
    }

    /// Initializes with initial value.
    public init(_ value: E) {
        _variable = Variable(value)
        _disposeBag = nil
    }

    /// Initializes with `Variable` and captures it.
    public init(capturing variable: Variable<E>) {
        _variable = variable
        _disposeBag = nil
    }

    /// Initializes with `Variable` but not capturing it.
    public convenience init(_ variable: Variable<E>) {
        self.init(unsafeObservable: variable.asObservable())
    }

    /// Initializes with `BehaviorRelay` but not capturing it.
    public convenience init(_ behaviorRelay: BehaviorRelay<E>) {
        self.init(unsafeObservable: behaviorRelay.asObservable())
    }

    /// Initializes with `Observable` that must send at least one value synchronously.

import RxSwift
import RxCocoa

/// A get-only `BehaviorRelay` that works similar to ReactiveSwift's `Property`.
///
/// - Note:
/// From ver 0.3.0, this class will no longer send `.completed` when deallocated.
///
/// - SeeAlso:
///     https://github.com/ReactiveCocoa/ReactiveSwift/blob/1.1.0/Sources/Property.swift
