Show HN: Embedded Ring Buffer C++98
&gt; memset(data, 0, LENGTH);<p>&gt;&#x2F;&#x2F; ...<p>&gt; T data[LENGTH];<p>I&#x27;m not sure how important it is in practice, but I&#x27;m pretty sure you don&#x27;t zero out the whole array for sizeof(T) &gt; 1.<p>Anyhow, memsetting to 0 a complex type is... not something I&#x27;d recommend in most cases.