Opened 8 years ago

Closed 8 years ago

Last modified 5 years ago

#123 closed defect - etc (fixed)

all grids leak memory

Reported by: peter Owned by: Gary J. Ferland
Priority: blocker Milestone: c13 release
Component: infrastructure Version: trunk
Keywords: memory leak Cc:


All grid runs leak serious amount of memory. On line 591 of iter_startend.cpp, LineSvSortWL is allocated without previously deallocating the array from the previous iteration of the grid like is done for LineSv a few lines up. It still needs to be checked whether simply adding

if( LineSvSortWL != NULL )
   free( LineSvSortWL );

in front of the MALLOC call is safe and sufficient.

In the long run it would better to convert this into a C++ container, preferably one that sorts implicitly, like map. That way we could also remove the call to qsort() and the extern "C" routine wavelength_compare() in prt_lines.cpp.

This needs to be fixed both on the trunk and c10_branch

Change History (3)

comment:1 Changed 8 years ago by Gary J. Ferland

Owner: changed from nobody to Gary J. Ferland
Status: newaccepted

comment:2 Changed 8 years ago by peter

Resolution: fixed
Status: acceptedclosed

Fixed on the mainline in r3796. Fixed on c10_branch in r3797.

comment:3 Changed 5 years ago by Ryan Porter

Milestone: C10 releasec13 release

Milestone C10 release deleted

Note: See TracTickets for help on using tickets.