xar_open and xar_iter_new require manual calls to close/free functions
to deallocate resources. This makes it easy to introduce memory leaks,
so add RAII struct wrappers for these resources.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
tools/llvm-objdump/MachODump.cpp | ||
---|---|---|
205 ↗ | (On Diff #117885) | this probably should be in the anonymous namespace |
tools/llvm-objdump/MachODump.cpp | ||
---|---|---|
211 ↗ | (On Diff #117895) | just to double check - does xar_close work fine with nulls ? (i.e. if xar_open has failed) |
tools/llvm-objdump/MachODump.cpp | ||
---|---|---|
206 ↗ | (On Diff #117928) | These really should have the copy and move constructors deleted as well as the assignment operator deleted. |
Comment Actions
Delete copy constructor (which implicitly deletes move constructor), and
assignment operator
I'd consider dropping the "Scoped" suffix & just having XarFile and XarIterator - but up to you.