Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cpp_api] Update
Deleter
to not free null pointers. (#5262)
[SC-53365](https://app.shortcut.com/tiledb-inc/story/53365/cpp-api-invalid-tiledb-object-error-messages-cause-noise) This PR updates the `Deleter` class do nothing when a null pointer is passed to it. Previously it would pass the pointer to `tiledb_***_free`, which would cause an error that gets ignored because most APIs return `void`, and emit an error log message. This resulted in lots of [noise in CI logs](https://github.com/TileDB-Inc/TileDB/actions/runs/10530673714/job/29181096416?pr=5255#step:14:2728). There are some cases in the C++ API where a null handle would be attempted to be freed, like [here](https://github.com/TileDB-Inc/TileDB/blob/9b4e5ea0c8b117716bc96dac71338ffc0d98a2db/tiledb/sm/cpp_api/array.h#L283) or [here](https://github.com/TileDB-Inc/TileDB/blob/9b4e5ea0c8b117716bc96dac71338ffc0d98a2db/tiledb/sm/cpp_api/current_domain.h#L74). Some of them can be eliminated by refactoring the initialization of the smart pointers, but this change is nevertheless valuable, because not all cases can be migrated, and null smart pointers are valid either way. --- TYPE: CPP_API DESC: Fix error log messages when using the `Array` class in the C++ API.
- Loading branch information