Skip to content

Commit

Permalink
Fix memory leaks when Batch is explicitly closed by close()
Browse files Browse the repository at this point in the history
  • Loading branch information
kubo committed Jun 26, 2024
1 parent fd337d9 commit 676fe61
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 7 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## 0.5.8 (2024-XX-XX)

Fixed Issues:

* Fix memory leaks when [`Batch`] is explicitly closed by [`close()`][`Batch::close()`].

## 0.5.7 (2023-01-30)

New features:
Expand Down Expand Up @@ -385,6 +391,7 @@ Incompatible changes:
[chrono]: https://docs.rs/chrono/latest/chrono/index.html
[`pool`]: https://www.jiubao.org/rust-oracle/oracle/pool/index.html
[`Batch`]: https://www.jiubao.org/rust-oracle/oracle/struct.Batch.html
[`Batch::close()`]: https://www.jiubao.org/rust-oracle/oracle/struct.Batch.html#method.close
[`Collection`]: https://www.jiubao.org/rust-oracle/oracle/sql_type/struct.Collection.html
[`Collection::indices()`]: https://www.jiubao.org/rust-oracle/oracle/sql_type/struct.Collection.html#method.indices
[`Collection::iter()`]: https://www.jiubao.org/rust-oracle/oracle/sql_type/struct.Collection.html#method.iter
Expand Down
1 change: 0 additions & 1 deletion src/batch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,6 @@ impl<'conn> Batch<'conn> {
/// Closes the batch before the end of its lifetime.
pub fn close(&mut self) -> Result<()> {
chkerr!(self.conn.ctxt(), dpiStmt_close(self.handle, ptr::null(), 0));
self.handle = ptr::null_mut();
Ok(())
}

Expand Down

0 comments on commit 676fe61

Please sign in to comment.