ayttm-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Ayttm-commits] CVS: ayttm/modules/msn2/libmsn2 msn_core.C,1.28,1.29 ms


From: Colin Leroy <address@hidden>
Subject: [Ayttm-commits] CVS: ayttm/modules/msn2/libmsn2 msn_core.C,1.28,1.29 msn_core.h,1.7,1.8
Date: Sat, 15 Mar 2003 22:33:46 -0500

Update of /cvsroot/ayttm/ayttm/modules/msn2/libmsn2
In directory subversions:/tmp/cvs-serv31869/modules/msn2/libmsn2

Modified Files:
        msn_core.C msn_core.h 
Log Message:
Implement ~message() (maybe less memleaks ?)



Index: msn_core.C
===================================================================
RCS file: /cvsroot/ayttm/ayttm/modules/msn2/libmsn2/msn_core.C,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- msn_core.C  13 Mar 2003 18:31:51 -0000      1.28
+++ msn_core.C  16 Mar 2003 03:33:44 -0000      1.29
@@ -854,8 +854,6 @@
     msg->font=NULL;
     msg->content=msn_find_in_mime(mime, "Content-Type"); // include any 
"charset=" I've chopped off
     ext_got_IM(conn, args[1], msn_decode_URL(args[2]), msg);
-    free(msg->header);
-    free(msg->body);
     delete msg;    
   } else if(!strcmp(content, "text/x-msmsgsinitialemailnotification")) {
     char * unread_ibc;

Index: msn_core.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/modules/msn2/libmsn2/msn_core.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- msn_core.h  21 Jan 2003 13:22:22 -0000      1.7
+++ msn_core.h  16 Mar 2003 03:33:44 -0000      1.8
@@ -47,7 +47,21 @@
 
   char * content; // Content-type
 
-  message() { header=NULL; font=NULL; content=NULL; }
+  message() { 
+         header=NULL; 
+         font=NULL; 
+         content=NULL;
+         body=NULL; }
+         
+  ~message() { 
+         if (header) free(header);
+         if (font) free(font);
+         if (content) free(content);
+         if (body) free(body);
+         header=NULL; 
+         font=NULL; 
+         content=NULL;
+         body=NULL; }
 };
 
 class userdata : public llist_data





reply via email to

[Prev in Thread] Current Thread [Next in Thread]