don't "dispose" of the soundID right away, you wouldn't hear anything, (atleast when i did it) you have to dispose of it latter... possibly if appropriate in the dealloc or viewDidUnload.
Score: 8
Date posted: 4/26/2012

In Dispose() you always recursively call Dispose()
Score: 7
Date posted: 6/5/2015

+1. Note that the "recommended" pattern of implementing `IDisposable` has the `Dispose()` and `Dispose(bool)` methods. When `Dispose(false)` is invoked, the method *is* called from the finalizer, and events *cannot* be raised.
Score: 6
Date posted: 7/15/2010

Rule of thumb: if it's disposable, dispose it when you no longer need it.
Score: 6
Date posted: 3/14/2013

Store subscription in variable, and dispose it when not needed using `dispose()`.
Score: 5
Date posted: 8/30/2016


© 2021 Search Overflow
Contributions licensed under cc by-sa