imageworks / Field3D

[NO LONGER MAINTAINED] A library for storing voxel data on disk and in memory.
https://github.com/imageworks/Field3D/wiki/Field3D-Home
BSD 3-Clause "New" or "Revised" License
305 stars 72 forks source link

Fix memory leaks in static variable pointers. #94

Closed mortenbh closed 4 years ago

mortenbh commented 6 years ago

Hi,

over at Autodesk we run Field3D under Valgrind, and we discovered that Field3D leaks a number of singletons in static variable pointers. This patch fixes these memory leaks by replacing the raw pointers with boost::scoped_ptr that will properly delete the objects when the library is unloaded.