Skip to content

file::GetContents and file::SetContents leak memory #4010

@pjh

Description

@pjh

What version of OR-Tools and what language are you using?
Version: stable, at head as of today
Language: C++

Which solver are you using (e.g. CP-SAT, Routing Solver, GLOP, BOP, Gurobi)
n/a

What operating system (Linux, Windows, ...) and version?
Linux x86_64

What did you do?
I'm using the //ortools/base:file library and with valgrind I detected a memory leak when using file::GetContents or file::SetContents. I've created #4009 to demonstrate the leak with a minimal example.

What did you expect to see
No memory leaks

What did you see instead?
"definitely lost: 48 bytes in 2 blocks"

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions