- , _buffer(copy._buffer)
- , _owns_buffer(owns_buffer)
+ , _buf(copy._buf)
+ , _id(copy.id())
+ , _owns_buf(owns_buf)
+{
+ if (owns_buf) {
+ _buf = (uint8_t*)malloc(_size);
+ if (copy._buf) {
+ memcpy(_buf, copy._buf, _size);
+ } else {
+ memset(_buf, 0, _size);
+ }
+ }
+}
+
+template<typename Timestamp>
+Event<Timestamp>::~Event() {
+ if (_owns_buf) {
+ free(_buf);
+ }
+}
+
+template<typename Timestamp>
+const Event<Timestamp>&
+Event<Timestamp>::operator=(const Event& copy)