Sfoglia il codice sorgente

deallocate arrays properly

David Rose 19 anni fa
parent
commit
1612f144ef
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  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 {
 
@@ -834,7 +834,7 @@ update_motion_trail (float current_time, LMatrix4f *transform) {
     // end geometry
     this -> end_geometry ( );   
 
-    delete _vertex_array;
+    delete[] _vertex_array;
     _vertex_array = 0;
   }
 }