Revision: 56186
http://sourceforge.net/p/brlcad/code/56186
Author: phoenixyjll
Date: 2013-07-23 05:42:30 +0000 (Tue, 23 Jul 2013)
Log Message:
-----------
Free the memory, and fix a wrong return value.
Modified Paths:
--------------
brlcad/trunk/src/libbrep/intersect.cpp
Modified: brlcad/trunk/src/libbrep/intersect.cpp
===================================================================
--- brlcad/trunk/src/libbrep/intersect.cpp 2013-07-23 05:31:28 UTC (rev
56185)
+++ brlcad/trunk/src/libbrep/intersect.cpp 2013-07-23 05:42:30 UTC (rev
56186)
@@ -1636,6 +1636,8 @@
}
}
+ delete brep;
+ delete tree;
return x.Count() - original_count;
}
@@ -2758,7 +2760,13 @@
bu_log("%d points on the intersection curves.\n", curvept.Count());
if (!curvept.Count()) {
- return 0;
+ delete brepA;
+ delete treeA;
+ delete brepB;
+ delete treeB;
+
+ // Should not return 0 as there might be overlap events.
+ return x.Count() - original_count;
}
// Fourth step: Fit the points in curvept into NURBS curves.
@@ -3102,6 +3110,10 @@
}
}
+ delete brepA;
+ delete treeA;
+ delete brepB;
+ delete treeB;
return x.Count() - original_count;
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits