-/* $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_
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>