Fix for orbital bug: using delete for memory created by minz.
This commit is contained in:
parent
70fa85d024
commit
27b7e7c6a9
@ -246,4 +246,9 @@ RawBytes Raster::save(Raster::Compression comp)
|
|||||||
return std::move(ret);
|
return std::move(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RawBytes::MinzDeleter::operator()(uint8_t *rawptr)
|
||||||
|
{
|
||||||
|
MZ_FREE(rawptr);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -11,8 +11,14 @@ namespace Slic3r {
|
|||||||
class ExPolygon;
|
class ExPolygon;
|
||||||
|
|
||||||
// Raw byte buffer paired with its size. Suitable for compressed PNG data.
|
// Raw byte buffer paired with its size. Suitable for compressed PNG data.
|
||||||
struct RawBytes {
|
class RawBytes {
|
||||||
std::unique_ptr<std::uint8_t> buffer = nullptr;
|
class MinzDeleter {
|
||||||
|
public:
|
||||||
|
void operator()(std::uint8_t *rawptr);
|
||||||
|
};
|
||||||
|
public:
|
||||||
|
|
||||||
|
std::unique_ptr<std::uint8_t, MinzDeleter> buffer = nullptr;
|
||||||
size_t size = 0;
|
size_t size = 0;
|
||||||
|
|
||||||
// FIXME: the following is needed for MSVC2013 compatibility
|
// FIXME: the following is needed for MSVC2013 compatibility
|
||||||
|
Loading…
Reference in New Issue
Block a user