SWF::Rect also have error.

The valgrind (memory leak check tool) finds no more error now! (in my test)
Index: src/SWFItem.cpp
===================================================================
--- src/SWFItem.cpp     (revision 243)
+++ src/SWFItem.cpp     (working copy)
@@ -125,7 +125,7 @@
 }
 
 Rest::~Rest() {
-       if( data ) delete data;
+       delete[] data;
 }
 
 bool Rest::parse( Reader *r, int end, Context *ctx ) {
@@ -211,7 +211,7 @@
                        data = new unsigned char[ lout ];
                        memcpy( data, dst, lout );
                }
-               delete dst;
+               delete[] dst;
                xmlFree( xmld );
        } 
 }
@@ -222,7 +222,7 @@
 }
 
 void Rest::setdata( unsigned char *d, int s ) {
-       if( data ) delete data;
+       delete[] data;
        data = NULL;
        size = s;
        
_______________________________________________
swfmill mailing list
swfmill@osflash.org
http://osflash.org/mailman/listinfo/swfmill_osflash.org

Reply via email to