Skip to content

Commit

Permalink
Use defer for releasing the output signal
Browse files Browse the repository at this point in the history
  • Loading branch information
krig committed Feb 1, 2015
1 parent 8f7bf8d commit 0083f25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/example4.go
Expand Up @@ -54,6 +54,7 @@ func main() {
if output == nil {
log.Fatal("OpenWrite failed")
}
defer output.Release()
signal = input.Signal()
} else {
check(input.Signal().Channels() == signal.Channels(), "channels")
Expand All @@ -65,5 +66,4 @@ func main() {
}
input.Release()
}
output.Release()
}

0 comments on commit 0083f25

Please sign in to comment.