Changeset 259 for inundation/ga


Ignore:
Timestamp:
Sep 1, 2004, 2:57:36 AM (20 years ago)
Author:
ole
Message:

Fixed memory leak in rotate and checked the rest

Location:
inundation/ga/storm_surge/pyvolution
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • inundation/ga/storm_surge/pyvolution/quantity.py

    r255 r259  
    451451if compile.can_use_C_extension('quantity_ext.c'):
    452452    #Replace python version with c implementations
    453 
     453       
    454454    from quantity_ext import limit #, extrapolate_second_order       
  • inundation/ga/storm_surge/pyvolution/shallow_water.py

    r246 r259  
    935935if compile.can_use_C_extension('shallow_water_ext.c'):
    936936    #Replace python version with c implementations
     937   
     938    pass
    937939    from shallow_water_ext import rotate
    938940    compute_fluxes = compute_fluxes_c
    939941    gravity = gravity_c
    940942    manning_friction = manning_friction_c
     943   
     944   
    941945    #distribute_to_vertices_and_edges = distribute_to_vertices_and_edges_c
    942946    #update_conserved_quantities = update_conserved_quantities_c   
  • inundation/ga/storm_surge/pyvolution/shallow_water_ext.c

    r258 r259  
    301301  //Rotate
    302302  _rotate((double *) r -> data, n1, n2);
    303  
     303
     304
     305  Py_DECREF(q);   
     306  Py_DECREF(normal);
     307       
    304308  //return result using PyArray to avoid memory leak
    305309  return PyArray_Return(r);
Note: See TracChangeset for help on using the changeset viewer.