]> git.tdb.fi Git - libs/net.git/blobdiff - source/protocol.h
Drop Id tags and copyright notices
[libs/net.git] / source / protocol.h
index 082687b3b1537c40b96ee9f9a86158d8d50bd38a..8ae5cdd149170c0bfdc0e5dcf3342e226ff27946 100644 (file)
@@ -1,10 +1,3 @@
-/* $Id$
-
-This file is part of libmspnet
-Copyright © 2009  Mikkosoft Productions, Mikko Rasa
-Distributed under the LGPL
-*/
-
 #ifndef MSP_NET_PROTOCOL_H_
 #define MSP_NET_PROTOCOL_H_
 
@@ -72,6 +65,12 @@ protected:
                PacketDef(unsigned i): PacketDefBase(i)
                { if(!class_id) class_id=next_class_id++; }
 
+               ~PacketDef()
+               {
+                       for(typename std::vector<FieldBase<P> *>::const_iterator i=fields.begin(); i!=fields.end(); ++i)
+                               delete *i;
+               }
+
                virtual unsigned get_class_id() const { return class_id; }
 
                template<typename T>