Skip to content

Commit

Permalink
Fix memory leak in crystallize method.
Browse files Browse the repository at this point in the history
  • Loading branch information
srdanrasic committed Nov 1, 2015
1 parent ab37f15 commit 92e8806
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Bond/Core/ObservableArray.swift
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,8 @@ public extension EventProducerType where EventType: ObservableArrayEventType {
observe{ capturedArray = Array($0.sequence) }.dispose()

let array = ObservableArray<ElementType>(capturedArray)
array.deinitDisposable += skip(replayLength).observe { event in
array.applyOperation(event.operation)
array.deinitDisposable += skip(replayLength).observe { [weak array] event in
array?.applyOperation(event.operation)
return
}
return array
Expand Down

0 comments on commit 92e8806

Please sign in to comment.