title: How to clean up after my custom Preference disappears
body: <p>I've got a custom <a href="http://developer.android.com/reference/android/preference/Preference.html" rel="nofollow"><code>Preference</code></a> in my app that uses a <a href="http://developer.android.com/reference/android/media/SoundPool.html" rel="nofollow"><code>SoundPool</code></a> (it's a volume control slider that plays a sample when the slider position is change.)</p>
  
  <p>I'd like to call <code>unload()</code> on the SoundPool when my Preference stops being shown to clean up after myself. Is there a good place to do that? In an <code>Activity</code> I'd put it in <code>onDestroy()</code>.</p>
  
  <p>I took a guess at <code>onPrepareForRemoval()</code> but that doesn't seem to be called.</p>