Skip to content

Instantly share code, notes, and snippets.

View sveinhal's full-sized avatar
Writing code

Svein Halvor Halvorsen sveinhal

Writing code
View GitHub Profile
@onevcat
onevcat / anygenerator_leak.swift.swift
Created April 6, 2016 04:03
AnyGenerator Leak?
let count = 3
var current = 0
let g = AnyGenerator<Int>(body: {
if current < count {
current += 1
return current - 1
} else {
return nil
}
})