summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Net/Connection.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/Net/Connection.h b/src/Net/Connection.h
index d13c2f6..42e0c8e 100644
--- a/src/Net/Connection.h
+++ b/src/Net/Connection.h
@@ -73,9 +73,19 @@ class Connection {
public:
Connection() {
transR.length = transR.transmitted = 0;
+ transR.data = 0;
}
- virtual ~Connection() {}
+ virtual ~Connection() {
+ if(transR.data)
+ delete [] transR.data;
+
+ while(!sendQueueEmpty()) {
+ delete [] transS.front().data;
+ transS.pop();
+ }
+
+ }
virtual bool isConnected() const = 0;
virtual const IPAddress* getPeer() const = 0;