title: delete original array pointer after copy sets first 3 bytes to 0
body: <p>The following program works untill a buffersize of something like 135.
  If the buffer gets any larger, the first 3.5 bytes get printed out as 0.
  (on a MKR1000 arduino)</p>
  
  <pre><code>uint8_t* bufferOut;
  size_t sizeOut;
  
  void SendMessage()
  {
      fillBuffer();
      sendBuffer();
  }
  
  void fillBuffer()
  {
      sizeOut = 12; //just an example
      uint8_t* tempBuffer2 = new uint8_t[sizeOut];
      bufferOut = tempBuffer2;
      delete[] tempBuffer2;
  }
  
  void sendBuffer()
  {
      Serial.Write(bufferOut, sizeOut);
  }
  </code></pre>
  
  <p>What am I doing wrong?
  Would std::vector be more suitable here?</p>
  
  <p>Thanks!</p>