From: abv Date: Sun, 3 Mar 2019 05:14:43 +0000 (+0300) Subject: 0027871: Possible memory leak in viewers in virtual windows mode X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FCR27871;p=occt-copy.git 0027871: Possible memory leak in viewers in virtual windows mode Command checktrend is modified to avoid performing check for lists containing less than 5 items, as estimations based on short lists often lead to false positives. --- diff --git a/src/DrawResources/TestCommands.tcl b/src/DrawResources/TestCommands.tcl index 4d0f849042..1bc84b4330 100644 --- a/src/DrawResources/TestCommands.tcl +++ b/src/DrawResources/TestCommands.tcl @@ -2731,13 +2731,14 @@ proc _checkpoint {coord_x coord_y rd_ch gr_ch bl_ch} { # the check fails and procedure raises error with specified message. # # Otherwise the procedure returns false meaning that more iterations are needed. -# Note that false is returned in any case if length of listval is less than 3. +# Note that analysis is peformed only if listval contains at least 5 values, +# thus false is returned unconditionally for shorter lists. # # See example of use to check memory leaks in bugs/caf/bug23489 # proc checktrend {listval delta tolerance message} { set nbval [llength $listval] - if { $nbval < 3} { + if { $nbval < 5} { return 0 } diff --git a/tests/v3d/ivtk/bug27567 b/tests/v3d/ivtk/bug27567 index 5d110ad008..bcb5e734c8 100644 --- a/tests/v3d/ivtk/bug27567 +++ b/tests/v3d/ivtk/bug27567 @@ -31,7 +31,7 @@ for {set i 1} {${i} <= ${i_max}} {incr i} { unset t - # Display the j-th shape + # Display the i-th shape ivtkdisplay b$i # Display shaded @@ -61,6 +61,6 @@ for {set i 1} {${i} <= ${i_max}} {incr i} { unset b$i lappend listmem [meminfo h] - checktrend $listmem 0 120000 "Memory leak detected" + checktrend $listmem 0 1 "Memory leak detected" }