Skip to content

Commit

Permalink
Merge branch 'main' of ssh://github.com/SpringQL/SpringQL-client-c
Browse files Browse the repository at this point in the history
  • Loading branch information
laysakura committed Jul 11, 2022
2 parents ebb2688 + 49c3f6b commit 1a9954c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ Also check the changes in springql-core: <https://github.com/SpringQL/SpringQL/b
<!-- markdownlint-disable MD024 -->
## [Unreleased]

## [v0.16.0+3] - 2022-07-11

### Fixed

- Memory leak of `SpringSourceRowBuilder` ([#58](https://github.com/SpringQL/SpringQL-client-c/pull/58))

## [v0.16.0+2] - 2022-07-06

### Added
Expand Down Expand Up @@ -118,8 +124,9 @@ Depends on springql-core v0.7.1.
[Semantic Versioning]: https://semver.org/

<!-- Versions -->
[Unreleased]: https://github.com/SpringQL/SpringQL-client-c/compare/v0.16.0+2...HEAD
[Unreleased]: https://github.com/SpringQL/SpringQL-client-c/compare/v0.16.0+3...HEAD
[Released]: https://github.com/SpringQL/SpringQL-client-c/releases
[v0.16.0+3]: https://github.com/SpringQL/SpringQL-client-c/compare/v0.16.0+2...v0.16.0+3
[v0.16.0+2]: https://github.com/SpringQL/SpringQL-client-c/compare/v0.16.0...v0.16.0+2
[v0.16.0]: https://github.com/SpringQL/SpringQL-client-c/compare/v0.15.0+2...v0.16.0
[v0.15.0+2]: https://github.com/SpringQL/SpringQL-client-c/compare/v0.15.0...v0.15.0+2
Expand Down
2 changes: 2 additions & 0 deletions springql.h
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,8 @@ enum SpringErrno spring_source_row_add_column_blob(SpringSourceRowBuilder *build
/**
* Finish creating a source row using a builder.
*
* The heap space for the `builder` is internally freed.
*
* # Returns
*
* SpringSourceRow
Expand Down
6 changes: 5 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,8 @@ pub unsafe extern "C" fn spring_source_row_add_column_blob(
}
/// Finish creating a source row using a builder.
///
/// The heap space for the `builder` is internally freed.
///
/// # Returns
///
/// SpringSourceRow
Expand All @@ -313,7 +315,9 @@ pub unsafe extern "C" fn spring_source_row_build(
builder: *mut SpringSourceRowBuilder,
) -> *mut SpringSourceRow {
let rust_builder = (*builder).to_row_builder();
SpringSourceRow::new(rust_builder.build()).into_ptr()
let ret = SpringSourceRow::new(rust_builder.build()).into_ptr();
SpringSourceRowBuilder::drop(builder);
ret
}

/// Frees heap occupied by a `SpringSourceRow`.
Expand Down

0 comments on commit 1a9954c

Please sign in to comment.