title: Clear out contents in NSMutableData
body: <p>I am new to Swift and iOS Development.
  How do we clear an <code>NSMutableData</code> without using release and then re-alloc/init again to be used again?</p>
  
  <p>I have tried <code>resetBytesInRange()</code> but that replaces the contents by zero.</p>
  
  <p>I tried <code>data.length = 0</code>, but there is garbage data at the end after appending.</p>
  
  <p><code>data.setData(nil)</code> gives an error.</p>
  
  <p>I read <a href="https://stackoverflow.com/questions/1890778/how-do-we-clear-out-contents-in-nsmutabledata">this question</a> but it doesn't solve my problem on swift.</p>
  
  <p>Please help.</p>