Talk:VTK/Examples/Cxx/Filtering/SurfaceFromUnorganizedPoints: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
(→‎Memory leak: new section)
(→‎Memory leak: use-after-free, not leak)
Line 9: Line 9:
This looks not so great, but of course it is not a hypersurface like the sphere anymore so...
This looks not so great, but of course it is not a hypersurface like the sphere anymore so...


== Memory leak ==
== Use-after-free corruption ==


readPoints looks like it will leak. It returns a raw pointer into a vtkSmartPointer object, but the smart pointer goes out of scope, releasing the controlled object. -- [[User:ScratchMonkey|ScratchMonkey]] 18:27, 4 January 2010 (UTC)
readPoints looks like it will cause a crash. It returns a raw pointer into a vtkSmartPointer object, but the smart pointer goes out of scope, releasing the controlled object. -- [[User:ScratchMonkey|ScratchMonkey]] 18:27, 4 January 2010 (UTC)

Revision as of 18:28, 4 January 2010

I'm sure you're aware, but it would be nice if the results were better for a point cloud that is posed as something better described by two surfaces:

r = 1 + i%2; x = r*std::cos(phi)*std::sin(theta); y = r*std::sin(phi)*std::sin(theta); z = r*std::cos(theta);


This looks not so great, but of course it is not a hypersurface like the sphere anymore so...

Use-after-free corruption

readPoints looks like it will cause a crash. It returns a raw pointer into a vtkSmartPointer object, but the smart pointer goes out of scope, releasing the controlled object. -- ScratchMonkey 18:27, 4 January 2010 (UTC)