Do not store iostream in shared_ptr (#872)

There is no need to store iostream in shared_ptr, doing so adds the cost
of a heap allocation.
This commit is contained in:
Cheng
2024-03-22 22:54:45 +09:00
committed by GitHub
parent f0ae00da12
commit 9663c22fe9
2 changed files with 28 additions and 28 deletions

View File

@@ -121,7 +121,7 @@ class PyFileReader : public io::Reader {
return out;
}
size_t tell() const override {
size_t tell() override {
size_t out;
{
nb::gil_scoped_acquire gil;
@@ -334,7 +334,7 @@ class PyFileWriter : public io::Writer {
return out;
}
size_t tell() const override {
size_t tell() override {
size_t out;
{
nb::gil_scoped_acquire gil;