Преглед на файлове

deallocate arrays properly

David Rose преди 19 години
родител
ревизия
1612f144ef
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      direct/src/motiontrail/cMotionTrail.cxx

+ 2 - 2
direct/src/motiontrail/cMotionTrail.cxx

@@ -709,7 +709,7 @@ update_motion_trail (float current_time, LMatrix4f *transform) {
         }
         }
       }
       }
 
 
-      delete nurbs_curve_result_array;
+      delete[] nurbs_curve_result_array;
     }
     }
     else {
     else {
 
 
@@ -834,7 +834,7 @@ update_motion_trail (float current_time, LMatrix4f *transform) {
     // end geometry
     // end geometry
     this -> end_geometry ( );   
     this -> end_geometry ( );   
 
 
-    delete _vertex_array;
+    delete[] _vertex_array;
     _vertex_array = 0;
     _vertex_array = 0;
   }
   }
 }
 }